Le 27/04/2021 à 15:21, Dan Ackroyd a écrit :
On Sat, 24 Apr 2021 at 15:03, Benjamin Eberlei <kont...@beberlei.de> wrote:
There is a much less invasive way to add new keywords/flags
to functions by using attributes.

Imho this decouples new features from the language and reduces the "risk"
of adding them to the language.
I think I disagree with this very strongly, and plan* to vote against
any RFC that embeds another language in annotations.**

It might be quicker, easier, and more seductive to implement language
level features in them, but it is a massive trade-off in making code
hard to reason about.

That should increase the likeliness of it
getting accepted in my opinion.
This can also be pronounced as "makes it more likely to slip bad ideas
in core without thinking them through fully".

My experience of annotations being used as an embedded language is
Java, and it's one of the reasons why I no longer use that language.

Not only is code with many lines of annotations hard to read, it
results in behaviour that is very hard to reason about. I literally
spent 40 hours (spread over the course of 5 weeks), trying to figure
out this bug https://stackoverflow.com/q/9072749/778719 . If my
colleague hadn't been able to tell me the answer, the only way I could
have debugged the problem myself is using a bytecode level debugger,
to step through the internal details of what was happening.

I'd prefer it if we didn't repeat (what I consider to be) the mistakes of Java.

cheers
Dan
Ack

Hello,

Yes, after reading a few answers I changed my mind and I do agree with you know, this is a language feature and should be in the language syntax and not in attributes.

Regards,

--

Pierre

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

Reply via email to