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

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

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
October 25, 2016 21:53
Subject:
Re: (\@a) = \($x,$y) in non-void context
Message ID:
20161025215333.15658.qmail@lists-nntp.develooper.com
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About