Hi Nikita,

wt., 7 wrz 2021 o 12:29 Nikita Popov <nikita....@gmail.com> napisał(a):

> Hi internals,
>
> I'd like to pick up a loose thread from the future scope of the
> https://wiki.php.net/rfc/static_return_type RFC, the $this return type for
> fluent APIs:
>
> https://wiki.php.net/rfc/this_return_type
>
> I have some reservations about this (which basically come down to $this not
> being a proper "type", so should it be in the type system?) but I can see
> the practical usefulness, so I think it's worth discussing this.


If the aim of $this return type is to force and check the return $this why
would we still need/require return statement to be obligatory?
Does that make sense to assume at the end of function flow the return
$this; statement to be present by default if the return type is not an
union etc.?

Cheers,
--
Michał Marcin Brzuchalski

Reply via email to