in reply to A pair of "mathematical" attributes for arrays?
Interesting ideas. I think that instead of :zero, I'd like something more flexible:
my @foo :autovalue(0); my @bar :autovalue(23); print "$foo[3]\n"; # prints 0 print "$bar[3]\n"; # prints 23
Obviously a while (@bar) would run until all memory was exhausted, so care would need to be exercised with the use of this attribute.
I like the :nocirc suggestion, but the name doesn't make much sense to me. How about :posindex?
Update: Thanks to moritz for calling me on my lack of caffeine induced foolishness. Now, more awake, I stand by the rest of what I wrote.
TGI says moo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A pair of "mathematical" attributes for arrays?
by moritz (Cardinal) on Sep 10, 2007 at 17:56 UTC | |
by TGI (Parson) on Sep 10, 2007 at 23:52 UTC | |
|
Re^2: A pair of "mathematical" attributes for arrays?
by blazar (Canon) on Sep 12, 2007 at 07:45 UTC | |
by TGI (Parson) on Sep 12, 2007 at 17:10 UTC |