Bart Lateur wrote: > > You don't declare Perl arrays. They just exist. Well... except for my'ed > arrays. > > My idea is that if anybody sets $[ to 1 in a script, all accesses to > array in that script would use 1 as the index of the very first item: > $ary[1]. But if you pass this array (for example, a reference to it) to > a function in a module that doesn't set $[, it would access the same > first item through index 0: $ary[0] or $ref->[0]. Sounds like it should be an attribute: my @a :base(1); But, now what about non-lexical arrays? How do you set an attribute on a global variable? -- John Porter Jetzt schalten wir das Radio an. Aus dem Lautsprecher klingt es dann...
- RFC 355 (v1) Leave $[ alone. Perl6 RFC Librarian
- Re: RFC 355 (v1) Leave $[ alone. Bart Lateur
- Re: RFC 355 (v1) Leave $[ alone. Nicholas Clark
- Re: RFC 355 (v1) Leave $[ alone. Nicholas Clark
- Re: RFC 355 (v1) Leave $[ alone. Bart Lateur
- Re: Variable attributes (was Re: RFC ... John Porter
- Re: Variable attributes (was Re:... Peter Scott
- Variable attributes - Object... John Porter
- Re: Variable attributes ... Nathan Wiger
- Re: Variable attributes ... Peter Scott
- Re: Variable attributes (was... Dan Sugalski
- Re: Variable attributes ... Jeremy Howard
- Re: Variable attributes ... Nathan Wiger
- Re: Variable attributes ... Peter Scott
- Re: Variable attributes ... Dan Sugalski
- Re: Variable attributes ... Nathan Wiger