Browse thread
How to do this properly with OCaml?
-
Thomas Fischbacher
- Christophe Dehlinger
- Berke Durak
- Michel Quercia
- Eric Cooper
-
Michael Alexander Hamburg
-
Xavier Leroy
- Berke Durak
- Michael Alexander Hamburg
- Thomas Fischbacher
- Alex Baretta
- skaller
- Thomas Fischbacher
-
Xavier Leroy
[
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: | skaller <skaller@u...> |
| Subject: | Re: [Caml-list] How to do this properly with OCaml? |
On Sun, 2005-07-24 at 23:45 -0700, Stephane Glondu wrote: > It would surely be interesting. But now, we have moved from "using > Obj.magic for better efficiency" to "modifying to collector"... Well, basically the real topic is how to implement variable length arrays. This is easy enough in C and C++: why should it be very hard or even impossible in Ocaml? > > However that turned what in C is a trivial set of > > library functions into a complex unreliable mess > > and left me wondering whether the encoding was > > properly transparent. > > I agree that strongly-typedness makes things more intricate sometimes, but > it will not make me prefer C... :-) I agree, but C++ has stronger array typing than Ocaml, so this is the wrong place to make such an argument :) The language requirements with respect to initialisation are the difference: Ocaml requires all store to be initialised, C/C++ does not. > BTW, for some purposes can also use another datatype such as a Map or a > Set. They do not involve such problems, are quite efficient, and more > enjoyable than in C... Yes sometimes: I just don't like not having a choice. -- John Skaller <skaller at users dot sourceforge dot net>