Re: Add $this return type

From: Date: Tue, 25 Jun 2024 21:25:11 +0000
Subject: Re: Add $this return type
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 25-6-2024 19:53, radar3301 wrote:

Sebastian Bergmann said:
[snip] please not "$this" as the name for a type. Off the top of my head, I think that "same" could make sense.
My primary vote would still be for "$this" as explained above, but I could potentially be persuaded to switch to "this" or "same" as alternatives if the dollar-sign is too much of a hang-up.
Not a fan of using a variable as a return type. This will cause havoc for Tokenizer based static analysis tooling. Not a fan of the implicit return either. Also don't really see the need as there is the static return type already.

Thread (8 messages)

« previous php.internals (#123846) next »