Re: RFC 177 (v1) A Natural Syntax Extension For Chained References

2000-08-31 Thread Jeremy Howard
Buddha Buck wrote: > At 05:35 PM 8/31/00 +, David L. Nicol wrote: > >Buddha Buck wrote: > > > > The array > > > > syntax would also be useful in multi-dimensional arrays. > > > > > > That is if multi-dimensional arrays are implemented as lists-of-lists, > > > which they might not be. > > > >Ev

Re: RFC 177 (v1) A Natural Syntax Extension For Chained References

2000-08-31 Thread Buddha Buck
At 05:35 PM 8/31/00 +, David L. Nicol wrote: >Buddha Buck wrote: > > > The array > > > syntax would also be useful in multi-dimensional arrays. > > > > That is if multi-dimensional arrays are implemented as lists-of-lists, > > which they might not be. > >Even if they aren't implemented as lol,

Re: RFC 177 (v1) A Natural Syntax Extension For Chained References

2000-08-31 Thread David L. Nicol
Perl6 RFC Librarian wrote: > arsenal. The constructs are: > > $ref->[[LIST]] > $ref->{{LIST}} > > The proposed respective meanings: > > $ref->[$elem[0]]->[$elem[1]}->[...]->[$elem[-1]] > $ref->{$elem[0]}->{$elem[1]}->{...}->{$elem[-1]} why not just use single

Re: RFC 177 (v1) A Natural Syntax Extension For Chained References

2000-08-30 Thread John Porter
Jarkko Hietaniemi wrote: > > By saying $hashref->{[LIST]} instead of $hashref->{{LIST}}, > > the only thing you would change is the semantics of the expression, > > Huh? Unless I missed something I didn't propose using $hashref->{[]} > anywhere... I used $ref->{{LIST}} and $ref->[[LIST]]. Rig

Re: RFC 177 (v1) A Natural Syntax Extension For Chained References

2000-08-30 Thread Jarkko Hietaniemi
On Wed, Aug 30, 2000 at 11:10:54AM -0400, John Porter wrote: > > Snatch two syntax constructs away from the jaws of illegal syntax and > > an unfortunate syntax, and make them useful weapons of the Perl > > arsenal. The constructs are: > > > > $ref->[[LIST]] > > $ref->{{LIST}} > > >

Re: RFC 177 (v1) A Natural Syntax Extension For Chained References

2000-08-30 Thread John Porter
> Snatch two syntax constructs away from the jaws of illegal syntax and > an unfortunate syntax, and make them useful weapons of the Perl > arsenal. The constructs are: > > $ref->[[LIST]] > $ref->{{LIST}} > > The proposed respective meanings: > > $ref->[$elem[0]]->[$ele

Re: RFC 177 (v1) A Natural Syntax Extension For Chained References

2000-08-29 Thread Buddha Buck
> On Tue, Aug 29, 2000 at 07:27:15PM -0700, Peter Scott wrote: > > > $r->{{qw(a b c d e f g h)}} > > > $r->{a}->{b}->{c}->{d}->{e}->{f}->{g}->{h} > > > > $r->{a}{b}{c}{d}{e}{f}{g}{h} > > > > which is only one character longer than the proposal... > > Except in the case wh

Re: RFC 177 (v1) A Natural Syntax Extension For Chained References

2000-08-29 Thread Michael Fowler
On Tue, Aug 29, 2000 at 07:27:15PM -0700, Peter Scott wrote: > > $r->{{qw(a b c d e f g h)}} > > $r->{a}->{b}->{c}->{d}->{e}->{f}->{g}->{h} > > $r->{a}{b}{c}{d}{e}{f}{g}{h} > > which is only one character longer than the proposal... Except in the case where you don't have

Re: RFC 177 (v1) A Natural Syntax Extension For Chained References

2000-08-29 Thread Peter Scott
>Having the >indices in one place saves a lot of characters. Compare > > $r->{{qw(a b c d e f g h)}} > >versus > > $r->{a}->{b}->{c}->{d}->{e}->{f}->{g}->{h} But I would compare it to $r->{a}{b}{c}{d}{e}{f}{g}{h} which is only one character longer than the proposal... -