On 18 October 2023 08:13:57 BST, "Olle Härstedt" <olleharst...@gmail.com> wrote:
>
>Not sure readability is improved here compared to existing @template
>annotations. ;)

That's because readability isn't the problem I was suggesting it would solve. 

As with attributes in general, the aim would be to have the core language 
validate the *syntax*, but libraries supply the *semantics*. 

Such a feature would also allow the set of attributes to be standardised in 
core - although I don't think I agree that "standardised on php-internals" is 
automatically better than "standardised by a forum of people who write static 
analysers".

I do take the point that if we ever did solve the problems of full 
implementation, e.g. by shipping a mandatory static analyser (aka compile-time 
checks), we'd have to change syntax again. For me, that does not outweigh the 
cost of "type declarations can no longer be trusted".

Regards,

-- 
Rowan Tommins
[IMSoP]

Reply via email to