Front page | perl.perl6.language |
Postings from May 2001
Re: slices
Thread Previous
|
Thread Next
From:
James Mastros
Date:
May 24, 2001 20:30
Subject:
Re: slices
Message ID:
000301c0e4ca$c0751840$0100000a@lilith
From: "Raul Miller" <moth@magenta.com>
To: <perl6-language@perl.org>
Sent: Thursday, May 24, 2001 7:49 PM
Subject: slices
> First: @a[@(...)] looks plausible as a slice syntax. Or -- if you
> specify an array value as an index, shouldn't that be a slice?
I like your second choice better. That is to say, all of these should
slice:
@foo[1..6]
@foo[@arrayvar]
@foo[list(func())]
@foo[list(1)]
(The last would give a single-element list, and thus probably be useless.)
But what about: @foo[(1,2,3)]?
Are those parens a list-maker, or are they a scalar expression using
the comma operator. (Or did we get rid of the comma operator when
I wasn't paying attention?) If we do have @foo[(stuff)] make stuff
be in list context, then that'd be a special case (I think).
-=- James Mastros
Thread Previous
|
Thread Next
-
slices
by Raul Miller
-
Re: slices
by James Mastros