in reply to Re^3: inside-out objects using arrays?
in thread inside-out objects using arrays?
You could avoid that problem by assigning the index to the first undef slot, rather than straight incrementing:
my $instance_index = List::Util::first { !defined $_ } @name;
You end up, though, with an O(n) constructor. But perhaps the savings in access make up for this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: inside-out objects using arrays?
by chromatic (Archbishop) on Sep 18, 2005 at 02:20 UTC | |
by rvosa (Curate) on Sep 18, 2005 at 12:23 UTC | |
|
Re^5: inside-out objects using arrays?
by ikegami (Patriarch) on Sep 18, 2005 at 02:52 UTC |