Hi Tim

On Thu, May 11, 2023 at 6:37 PM Tim Düsterhus <t...@bastelstu.be> wrote:
> 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

We've already talked in private, but let me state my position here as well.

The implementation is quite simple (~60 lines of non-whitespace,
non-generated C code), and does not introduce any new syntax that
parsers/static analyzers are *forced* to handle.

The RFC shows that there is a benefit for code using the attribute,
namely showing intent to the reader, reducing the risk of typos and
being more resistant to errors when refactoring / upgrading library
versions. Having the feature supported by the engine, while not
strictly necessary, allows users who don't use static analyzers to
profit from it, and define consistent semantics for static analyzers
to follow.

The benefits seem worth the maintenance cost, even if small for the
average user.

Ilija

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

Reply via email to