[Haskell-cafe] What is a Boxed Array?

Evan Laforge qdunkan at gmail.com
Fri Dec 9 18:04:51 EST 2005

> Hmmm.... I thought that arrays in Python have no reason to be boxed. Lists,
> yes, since they are untyped, so they are arrays of pointers, but arrays are
> homogeneous.

Python has a different meaning for "list" than the rest of the world. 
When python says "list", read "boxed array" (heterogeneous) and when
it says "array" read "unboxed array" (homogenous).

> I don't know why boxing may simplify the *memory model*.

If you can have unboxed types floating around then you need to ether
put them on the stack or your GC needs to be cool with them...
relocating GC I imagine having especial trouble with unboxed types. 
Having a common handle on all types would certainly simplify the GC. 
I don't know if this is what he meant by "memory model".

> The most dramatic effect of implicit boxing is the possibility -
> available in Smalltalk - to change the *identity* of an object.

Wow, just when you thought you were safe from aliasing...

More information about the Haskell-Cafe mailing list