Browse thread
[Caml-list] const equivalent for mutable types?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | brogoff <brogoff@s...> |
| Subject: | Re: [Caml-list] Functional arrays |
On Sat, 1 Aug 2004, skaller wrote: > On Sun, 2004-08-01 at 03:23, Jon Harrop wrote: > > On Saturday 31 July 2004 17:35, skaller wrote: > > > On Sat, 2004-07-31 at 23:44, Jon Harrop wrote: > > > > Incidentally, does anyone have a functional array implementation (which > > > > doesn't suck ;-)? > > > > > > Map? > > > > Well, by "array" I mean a container with O(1) random access where "n" is the > > number of elements already in the container. ;-) > > > Anyway, I'm considering implementing arrays which look functional but which > > use built-in arrays and keep track of "derived" arrays (e.g. subarrays) One problem with even the simple minded solution of a type of array without set is that it isn't a covariant container, like a list, and you can't make it one, even though that should be allowed. That may not bug you, but it was an annoyance for me when I discovered this. Jacques Garrigue said it was probably too much work to fix that. Any functional array you build on top of arrays gets bit by this. -- Brian ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners