Stephen P. Potter wrote:
> Lightning flashed, thunder crashed and "Jeremy Howard" <[EMAIL PROTECTED]>
whispered:
> | > > No, neither proposal makes sense. Arrays can be stored compactly and
> | >
> | > $a[1_000_000_000] = 'oh, really?' # :-)
> | >
> |   my int @a: sparse;
> |   $a[1_000_000_000] = 'Yes, really!' # :P
> |
> | OK, so I cheated... I haven't submitted my RFC for a 'sparse' attribute
yet.
> | My point is that arrays *can* be stored compactly, not that they always
> | *are*. Another type of array storage is that required for lazily
generated
>
> Isn't this just as true, maybe even moreso for hashes?  How much storage
is
> taken up by
>
> $a{1_000_000_000} = "Sparse, without any special code!";
>
Yes, in this case (it wasn't my example!). But I would hope that we provide
a way of providing compact array storage where we need it. This would be
useful for lists of floats or ints that will be frequently iterated through
and directly manipulated. Image processing and statistical analysis come to
mind as obvious applications. Anyway, this is hard to discuss without an
RFC... I'm sure I've get some time to write one someone around here...


Reply via email to