Jonathan Scott Duff wrote:

The solution I advocate is to allow even "primitive" types to hold
undef.

Why do you then use a primitive type in the first place?

IMHO:

1) primitive types are what they are - no undef, no attributes, just e.g. plain integers (or shorts or bits ...)

2) if you want to store additional information use a "normal" perl variable i.e. a parrot PMC.

Why on earth would we want to take advantage of primitive types - when then people additionally want to tuck their birthdate on it?

The array of 1e6 ints takes 1e6 words, the same array of PerlInts allocates ~10 times the memory and causes additional a lot of GC overhead.

And finally, if you a need a few more bits of information for your IntArray[1e6], then wrap it into your own array class - we are speaking of perl here - or do we?


-Scott

leo




Reply via email to