Front page | perl.perl6.language |
Postings from May 2005
single element lists
Thread Next
From:
Jonathan Scott Duff
Date:
May 11, 2005 09:45
Subject:
single element lists
Message ID:
20050511164512.GB6941@pobox.com
We're discussing the proper semantics of (1)[0] on #perl6. Here's
where we're at so far:
1. specialise ()[] to parse as (,)[]
2. scalars are singleton lists, so ()[] naturally
3. make (1)[0] die horribly.
We all seem to agree that #3 is least useful and probably wrong. But
there's a divide between whether #1 or #2 is the "right" behavior.
#2 implies that (1)[0][0][0][0] == 1
#1 means that (1)[0] == 1 and (1)[0][0] is an error
FWIW, I'm in favor of #1
What does p6l think? (What does @Larry think?)
-Scott
--
Jonathan Scott Duff
duff@pobox.com
Thread Next
-
single element lists
by Jonathan Scott Duff