On Wed, 2005-07-27 at 08:35 -0700, David Thomas wrote: > I'm still curious what numerical algorithm is so > desperately in need of variable length arrays... I think I was not clear. Normally Ocaml boxes contain either an int or a heap pointer to a data object. So a floating point value is represented by a pointer. Doing numerical programming with an array of pointers to floats instead of an array of floats has a performance impact, so Ocaml now provides arrays of unboxed floats. I wasn't referring to the need for variable length arrays in numerical code, but the need to circumvent boxing in numerical code for arrays of numerical values: this is considered significant enough to warrant specialised compiler optimisations and data structures. The point being, arrays of boxes are considered inefficient, and in some cases it is already considered significant enough for considerable work to be done to fix it. So arguing an extra indirection required for the array of option solution to variable length arrays is insignificant is contrary to the evidence that INRIA already accepts it can be inefficient. Again, this is not to say variable length arrays without this extra overhead should be provided, just that the argument that the overhead is not significant is suspect. -- John Skaller