Hi Tim

On 5/11/23 18:37, Tim Düsterhus wrote:
> Hi
> I'm now opening discussion for the RFC "Marking overridden methods 
> (#[\Override])":
> ----
> RFC: Marking overridden methods (#[\Override])
> https://wiki.php.net/rfc/marking_overriden_methods
> Proof of concept implementation is in:
> https://github.com/php/php-src/pull/9836
> ----
> Thanks to Ilija Tovilo for reviewing the implementation, providing additional 
> test cases and proof-reading the RFC text. Also thanks to my coworkers at 
> WoltLab for proof-reading the RFC text as well. Any remaining mistakes [1] 
> are my fault :-)
> Best regards
> Tim Düsterhus
> [1] For example the typo in the URL that I noticed too late.

I support this RFC. Thank you for working on this.
The implementation also looks quite small and not intrusive in the engine.

I see some people sharing feelings that this perhaps belongs more into static 
analysis tools instead.
In my opinion, static analysis tools are used to catch mistakes the language 
can't protect you against (*).
In the case of this attribute, the language could very well protect the user so 
I think it makes sense to add it to the language.
Furthermore, implementing it in the language makes it universal.

(*) at least, without sacrifices

Kind regards

PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to