develooper Front page | perl.perl6.language | Postings from May 2005

Re: (1,(2,3),4)[2]

Thread Previous | Thread Next
From:
Larry Wall
Date:
May 11, 2005 17:02
Subject:
Re: (1,(2,3),4)[2]
Message ID:
20050512000207.GB9726@wall.org
On Wed, May 11, 2005 at 06:24:38PM -0400, Aaron Sherman wrote:
: I'm confused as well. How does that play with Larry's comment:
: 
: http://groups-beta.google.com/group/perl.perl6.language/browse_frm/thread/54a1135c012b97bf/d17b4bc5ae7db058?q=list+comma&rnum=5&hl=en#d17b4bc5ae7db058

Well, that approach would also work.  I'm just not sure it's what
people would expect.  It's a little retroactive for .[] to change the
context of the expressions in ().  These days I think I'd rather have
something out front that specifically says you want a list of scalars.
Perhaps

    scalar(1,(2,3),4)

should be our list of scalars context, and produce [1,[2,3],4].  Or maybe
something else should indicate LoS.

Larry

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