On Wed, May 11, 2005 at 01:11:45PM -0700, Larry Wall wrote:
> On Wed, May 11, 2005 at 11:45:12AM -0500, Jonathan Scott Duff wrote:
> : 
> : 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.
> : 
> I think it has to be #1.  We can't have (@foo)[0] working at two different
> indirection levels depending on whether @foo == 1.

Hm?  Under #2, no matter whether @foo is (1) or (1,2), the construct
(@foo)[0] would always means @foo.[0].  Not sure how the length of @foo
matters here.

Thanks,
/Autrijus/

Attachment: pgpiDLzKqsG2b.pgp
Description: PGP signature

Reply via email to