On 07/02/2023 14:07, Olle Härstedt wrote:
It should perhaps be mentioned that analyzers can use type annotations during their process, instead of the more clunky /** @var string */ or similar you have to use today for local variables.
This sounds like you're reaching for Python's approach, where the language "supports" the type annotation syntax, but doesn't actually do anything with it. I explained in another thread why I think that is a poor compromise, because it's unclear whether you can actually trust the annotations.
The current "clunky" syntax is clearly a comment as far as the language itself is concerned, so there is no expectation when reading it that it will have a meaning to plain PHP.
Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php