RFC: Shorter Attribute Syntax Change is in voting phase

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
  • #5559

    RFC: Shorter Attribute Syntax Change is in voting phase


    Just eyeballing the current votes, looks like `#[Attr]` will win out in the end, once the 2nd preference votes from the people who voted `@[Attr]` are taken into account.


    The discussion has been incredibly infuriating to read this entire time.



    I’ve lost some respect for Derick. [This message in particular](https://externals.io/message/111312#111415) made me rage a bit. Counting pixels? Who the hell uses a non-monospaced font for code??? What kind of argument is that?!?!? And he tries to turn the burden of proof back onto people who are complaining that the RFC — that _he_ proposed — doesn’t show enough evidence by saying (about ending delimiters) “But you haven’t said why it is better that not having it is better”. Really? The burden of proof is on you, as the person proposing the RFC. He even threw in a “[citation required]” for good measure. All this follows that debacle where he tweeted that PHP devs are amateurs if they don’t use xdebug. Ugh.

    I know rule #2 on this subreddit is “remain civil”, but it’s really hard to when such terrible argumentation happens on the internals by people who hold so much control over the future of the language.

    Shoutout to Theodore Brown for putting forward strong arguments against this revote. I think it’s a huge mistake to do a revote last minute without _very clear_ evidence of issues with `@@`. All the arguments in the RFC against it are weak.


    I couldn’t care less what the syntax is, because I’m a clueless numpty when it comes to internals. Just want to say thank you to everyone on core for all their efforts towards PHP 8.


    Not sure why `@@` precludes grouping syntax later. Just add `@@{…}` (or whatever braces) if it turns out it’s needed.


    Derick takes a lot of flak here but I’m glad he did step up.

    We all would have gone with `@@` if it had happened, but I’m glad an “having an ending delimiter” approach is being favoured (as evident by the current voting stats). TBH I frankly couldn’t care less which one though, except `<<` and `>>` feels noise due to the repetitiveness of the character, so I favour the ones using `#[]` or `@[]`. As does a substantial amount of voters 👀

    Ending delimiters, to me, give closure. I need this. My brain needs it. My vi-muscle memory needs it (`%` for those in-the-know).

    That’s why I couldn’t make myself work with python the last 20 years. The indentation is _not enough_ for my brain.


    The syntax doesn’t bother me at all. Personally, I like the @[] and <<>> syntaxes the most, but my opinion doesn’t really matter much – I’ll use whatever is approved and not be too whiny about it.

    But, and it’s likely this was discussed and I just missed it, but why is ReflectionClass the only way to process the attributes? That makes it seem shoehorned in, and just bolted on. Were any other methods discussed? Planned for the future?

    I’m not bitching here, I really want to understand the ‘why’. Admittedly, I don’t really follow internals all that much.


    The more I see this attribute feature the more I feel this is hideous. I fear it will be misused in so many ways.


    I was all in for @@ but after seeing the grouped examples, I think I like #[] or @[] more. So I’m all for it, anything is better than <<>>.


    RemindMe! August 23, 24:00 UTC


    ITT: Redditors have better opinions and more upboats than internals contributors so they should just cancel their discussions and go with whoever has the most updoots on Reddit.


    Quite an opportunity here for developers of IDE plugins. Once the final format is implemented you could have an editor option to allow you to select the attribute format. The code itself would still use the official format but as far as the developer goes, they could see whatever they want. They could even customize and produce their very own syntax.

    You could even go one step further and collect data on which format is the most popular. And use it to inform PHP 9.

    Everyone wins.


    The PHP community:

    *Must… shove… attributes in PHP… no matter how terrible it looks…*

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.