> Perhaps you meant that Perl 6 is going to have homogeneous arrays, in
> which case an array of ints would keep 32 bits (per value) of int data in
> the array and auto-generate the extra flags and stuff when a value is
> extracted from the array. That's possible, but it's a special case of small
> ints. You already know how jwz likes special cases.

Basically, yes. All I was pointing out was in Perl6 it *will* be possible
to have a large array of purely integers, thus using 4*@a or 8*@a bytes
of total storage, say.
It will also be possible (if someone can be bothered to code it)
to have an array where some elements are integers, occupying 4 bytes + a bit,
while other entries are full SVs. The particular array implementation
just needs enough storage per element (somehow or another) to note
whether a partcular slot contains a 4-byte int say or an SV pointer.
Or other such weird and wonderful things. Basically, Perl6 gives you
much, much more freedom in having multiple array (and hash) implementations
optimised for different things. Not enough to keep JWZ happy of course,
but much better nevertheless.

Reply via email to