On Mon, 10 Aug 2020, Andreas Leathley wrote:

> On 10.08.20 15:05, Markus Fischer wrote:
> > Personally, and never gave it much thought TBH, the `@@` AND `<<`/`>>`
> > in fact is the most "unreadable" version to me because duplicate
> > occurrence of a single character somehow creates a noise _for me_,
> > 
> > I don't feel eligible to have a vote, but based on that and certainly
> > aware IDEs in the future will help with this, I would vote for
> > _anything_ not duplicating characters, i.e. favoring `#[]` or `@[]`
> 
> It is a pity that syntax with ending delimiters and syntax with no
> ending delimiters are now mixed in the discussion, instead of first
> finding a concensus if delimiters are even needed or what
> advantages/disadvantages they have.

It missing an ending delimiter was my first reason for wanting to get 
something better than @@. I don't particularly care much if it ends up 
being @[], #[], <<>>, or other things such as @:( ).

In my original email, I solicited other syntaxes (with patches), but 
none were brought up.

> Because there are many alternatives in terms of syntax - looking back 
> at the very first vote about attributes the @: syntax doesn't seem so 
> bad, if no ending delimiters are needed. In the new RFC all 
> alternatives to @@ have delimiters and it is suggested having them is 
> good, yet the possible advantages of delimiters are never explained, 
> ideally with some real-world examples showing why delimiters would be 
> good to have.

If you have something to open, and close, there there is a distinct area 
that forms the whole definition of a thing. That's why functions, and 
classes have { and }, if and other control structures have ( .. ), etc.

Being able to define a whole "thing" easily with an open and closing set 
of symbols, allows for better mental parsing. It also means that syntax 
highlighting tools can map the opening part with the closing part. (VIM 
for example, uses the % character to jump between opening and closing 
symbol).

cheers,
Derick

-- 
PHP 7.4 Release Manager
Host of PHP Internals News: https://phpinternals.news
Like Xdebug? Consider supporting me: https://xdebug.org/support
https://derickrethans.nl | https://xdebug.org | https://dram.io
twitter: @derickr and @xdebug

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

Reply via email to