Re: [RFC] Shorter attribute syntax
| From: | Benas IML | Date: | Thu, 04 Jun 2020 05:24:35 +0000 |
| Subject: | Re: [RFC] Shorter attribute syntax | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-110357@lists.php.net to get a copy of this message | ||
Hello,
thank you for the RFC but I hope it doesn't pass. Here's my constructive
feedback as to why.
Verbosity? Are we really debating whether adding 2 extra characters is more
"verbose"? Well, with 3 or more grouped attributes, we are less verbose by 1
character. I don't find "verbosity" to be an argument as to why we should
use
the
@@ syntax.
Moreover, we become inconsistent with basically every other programming
language. Even <<...>> syntax is more consistent since our sister language
Hack has it. I don't think it's a good idea to reinvent the wheel.
And well, a BC break, even as small as it, is a BC break.
Best regards,
Benas
On Thu, Jun 4, 2020, 2:55 AM Theodore Brown <theodorejb@outlook.com> wrote:
> Hi internals,
>
> I discussed the syntax for attributes further with Benjamin, Martin,
> and several other internals developers off-list, and with their
> feedback completed an RFC proposing to use the shorter @@
> syntax
> instead of <<>> for attributes in PHP 8.
>
> https://wiki.php.net/rfc/shorter_attribute_syntax
>
> The goal is not to bikeshed over subjective syntax preferences,
> but to address several concrete shortcomings related to verbosity,
> nested attributes, confusion with generics and other tokens, and
> dissimilarity to other common languages.
>
> Best regards,
> Theodore
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>