On Thu, Aug 6, 2020 at 9:18 AM Côme Chilliet <
come.chill...@fusiondirectory.org> wrote:

> Le Thu, 6 Aug 2020 07:48:05 +0100 (BST),
> Derick Rethans <der...@php.net> a écrit :
> > From the RFC:
> > - No ending delimiter
>
> As said before, it does have an ending delimiter when they are arguments
> since
>  there is the parenthesis around them. When there are no arguments I don’t
> see
>  the benefit of an ending delimiter, it’s easy to spot the end of the word.
>
> > - Doesn't allow grouping
>
> I do not understand this argument, what is the point of grouping for @@?
> Does grouping mean anything special for other syntaxes, or is it just to
> save
>  keystrokes? If it is just to get a more concise syntax when there are
> several
>  attributes, the fact that @@ do not need grouping is a pro, not a con.
>
> > - No forwards compat with PHP 7
>
> But no BC break either, while #[] introduces BC break.
>

This is **not** true. Both @@ and #[  will break existing PHP 7 code!

The question is how likely each of them is. #[ will be slightly higher than
@@ - but both will still be in the 0,000001% range of occurrences.

and for *both* the same Fix is a project wide sed that replaces @@ with
@<space>@ and #[ with #<space>[ respectively.


> > - Not used ny another language
>
> @ is used by a lot of other languages, and @@ is the closest we can get in
> PHP.
>
> Côme
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php
>
>

Reply via email to