On Wed, Jan 11, 2017 at 3:15 PM Andrea Faulds <a...@ajf.me> wrote:

> Regarding the =& open issue in the RFC, I don't think the =& syntax
> makes sense to me. The thing on the right-hand side of a list()
> assignment is the array, not its values. It makes no difference for the
> purposes of assigning from its values if the array is a reference or
> not, so I'd expect the & here to do nothing at all. So, having the &s
> only on the left-hand side makes more sense to me. I think supporting =&
> would be a potential source of confusion.
>

Duly noted.  I too would prefer not to implement it as well, keeping just
one supported syntax.  Although, since both syntaxes were raised as
potential implementations in the bugs I thought it would be something to at
least ask everyone to consider.  Better to raise the subject and have
everyone concur not to do it, than to ignore it, imo.  Going forward, I
guess I'd like to know if anyone -would- want to support it.


> On a different note, the RFC doesn't mention support for the shorthand
> list() syntax introduced in 7.1 (i.e. `[&$a, &$b, &$c] = $arr;`). Since
> it shares its implementation with list(), I assume it is indeed
> supported, but you should probably explicitly whether or not it is, for
> clarity's sake.
>

Yup, you're right.  list() = and [] = do seem to follow the same
compilation/execution so there's no difference.  I'll make sure to note it
in the RFC just to note.

Cheers
--
Dave

Reply via email to