develooper Front page | perl.perl5.porters | Postings from October 2016

Re: (\@a) = \($x,$y) in non-void context

Thread Previous | Thread Next
Father Chrysostomos
October 25, 2016 21:53
Re: (\@a) = \($x,$y) in non-void context
Message ID:
Dave Mitchell wrote:
> Given the amount of time (i.e. too much) that I've already spent on
> reworking the AASSIGN op, I think I'm going to leave undef

By which I think you mean returning the rhs if the lhs is immortal.  I
would say yes, let sleeping dogs lie; since it is not clear how things
*should* behave, just preserve the existing behaviour.

> and \(@a)
> lvalue behaviour alone for now. I'll still merge the f(($a,@b, $c) = ())
> fix though if people agree.

I may be too late, but what would the new behaviour be?  If I under-
stand correctly, it would be that the number of elements on the
rhs is returned in scalar context, but the elements on the lhs are
returned in list context.  Is that right?  Is that what we want?

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About