[Haskell-cafe] Mutable but boxed arrays?
Henning Thielemann
lemming at henning-thielemann.de
Wed Sep 5 14:37:55 EDT 2007
Can someone explain me, why there are arrays with mutable but boxed
elements? I thought that boxing is only needed for lazy evaluation.
However if I access an element of an array that is the result of a
sequence of in-place updates, all updates must be executed in order to get
the final value. That is, the first access to an element of such an array
evaluates all elements of the array - which sounds for me like eager
evaluation. So what's the reason for boxes in mutable arrays? Maybe I
misunderstand the Box concept, and Box means just Pointer. It would make
sense to store pointers in an array if the size of the elements vary.
More information about the Haskell-Cafe
mailing list