[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: exists $foo[7] and delete $foo[7]
On Fri, Jan 14, 2000 at 07:30:59AM +0200, "Jarkko Hietaniemi" wrote:
> Mark Mielke writes:
> > But wait... you can ALREADY do things with sparse arrays...
> > $a[500] = 1;
> > Does NOT allocate 501 SV's. It allocates exactly one. The internal array
> > underneath may actually be "501 * sizeof(void *)" bytes big... but who
> > cares? Did the user worry about it before?
> Try
> $a[500_000_000] = 1;
> and then talk again about Perl already having sparse arrays and
> the internal array underneath not being important.
1) 500_000_001 SV's are NOT allocated.
2) This is an implementation detail that can be dealt with in the
future, and can therefore be currently considered a bug.
mark
--
markm@nortelnetworks.com/mark@mielke.cc/markm@ncf.ca __________________________
. . _ ._ . . .__ . . ._. .__ . . . .__ | SIR Tools (7H12)
|\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ | Nortel Networks
| | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada
One ring to rule them all, one ring to find them, one ring to bring them all
and in the darkness bind them...
http://mark.mielke.cc/
- References to:
-
Tom Christiansen <tchrist@chthon.perl.com>
Bart Schuller <schuller@lunatech.com>
Ted Ashton <ashted@southern.edu>
"Mark Mielke" <markm@nortelnetworks.com>
Jarkko Hietaniemi <jhi@iki.fi>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]