Front page | perl.perl6.language |
Postings from May 2001
From: David Whipp
May 25, 2001 13:44
Message ID: firstname.lastname@example.org
Uri Guttman wrote:
> so we have to get some way to denote a list of indices as a slice and
> also support some range operation as a possible component of that list
> with the knowledge that the range arguments are also indices and not
> just integers.
> i don't have any syntax ideas for this at the moment.
We already have the concept of contexts (list, scaler, bool, etc.). SO
we can start with the concept of "index context" (list-index context
for slices). In index context, we could define "*" as a special token
that returns the highest index.
Then, @a[(0..*)] would be the whole list; @a[(0..*-1)] is everything
but the last_elem. Any users of UML (or data modeling in general)
will likely find this notation comfortable.
Dave Whipp, Senior Verification Engineer,
Fast-Chip inc., 950 Kifer Rd, Sunnyvale, CA. 94086
tel: 408 523 8071; http://www.fast-chip.com
Opinions my own; statements of fact may be in error.