On Tue, 4 Aug 2020, Sara Golemon wrote:

> On Tue, Aug 4, 2020 at 9:03 AM Benjamin Eberlei <kont...@beberlei.de> wrote:
> 
> > It provides a small BC break where code written as @[$foo, $bar] = 
> > baz(); or $foo = @["bar" => $baz]; will not compile on PHP 8 
> > anymore, but that can be easily fixed by writing it with a space 
> > between @ and [.
> >
> If those are the potential breaks we're choosing between, I would 
> favor #[...] as it provides strong forward-compatibility to drive 
> adoption and use at the cost of a parse error that's easily fixed 
> (even programmatically with a very simple script).  @[...] provides no 
> forward compat with a roughly equal chance of easily fixed syntax 
> break.
> 
> Given that, the choice seems obvious to me. Change my mind?

I pretty much agree, but @[ … ] is there as a compromise as it does show 
some fmailiarity with the already existing @ in doc blocks.

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