[Haskell-cafe] What is a Boxed Array?

2005-12-09 Thread John Velman
I've tried google and google scholar, wikipedia, and planetMath. Can't find a description. Can someone point me to a freely available reference? Thanks, John Velman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] What is a Boxed Array?

2005-12-09 Thread Cale Gibbard
A box is a cell representing some value in a program. It generally contains a pointer to code (a thunk), or to a proper value. When evaluation of that box is forced for the first time, the code executes, and when it is done, it updates the pointer with a pointer to the result value. There are a

Re: [Haskell-cafe] What is a Boxed Array?

2005-12-09 Thread Tomasz Zielonka
On Fri, Dec 09, 2005 at 02:29:33PM -0500, Cale Gibbard wrote: A box is a cell representing some value in a program. It generally contains a pointer to code (a thunk), or to a proper value. When evaluation of that box is forced for the first time, the code executes, and when it is done, it

Re: [Haskell-cafe] What is a Boxed Array?

2005-12-09 Thread jerzy . karczmarczuk
Tomasz Zielonka: ... there are other reasons to box values besides implementing laziness, like for simplifying the memory model (which can simplify GC implementation), allowing to intermix values of different types (different kinds of polymorphism) or allow variable sized values (think

Re: [Haskell-cafe] What is a Boxed Array?

2005-12-09 Thread John Velman
Thanks, this is very helpful. John Velman On Fri, Dec 09, 2005 at 02:29:33PM -0500, Cale Gibbard wrote: A box is a cell representing some value in a program. It generally ... ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] What is a Boxed Array?

2005-12-09 Thread Evan Laforge
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