Browse thread
Re: "Re: [Caml-list] A G'Caml question" + additional info
-
Patrick M Doane
-
Brian Rogoff
-
Patrick M Doane
-
Brian Rogoff
- Patrick M Doane
-
Brian Rogoff
-
Patrick M Doane
-
Brian Rogoff
[
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: | Patrick M Doane <patrick@w...> |
| Subject: | Re: "Re: [Caml-list] A G'Caml question" + additional info |
On Mon, 2 Jul 2001, Brian Rogoff wrote: > I'm convinced that the include scheme, when properly integrated with > modules, will be sufficient. We need more experience with the current > scheme. I'm convinced now too, it took me a day or two to think things over to come to the same conclusion. Caml already has support for generic programming by using functors but they can get cumbersome when concepts are highly separated. For example, I usually see every algorithm written as a functor. This is very powerful, but requires many more lines of code for all the functor instantiation. In some sense, we also lose a nice aspect of core ML -- the ability to avoid specifying types. Initially I thought that G'caml (when integrated with the rest of the language) wouldn't be able to improve on this model for writing libraries. When all the code is under central control, the code can obviously be reordered such that all generic values come before all derived generics. I now see that a library which wants to provide generic algorithms will be much easier to write with G'caml. Rather than providing a functor for every algorithm which must be instantiated in for a large variety of types, the library would provide one functor per module which needs to be instantiated once with the generic values defined by the application. This all makes sense, and is easy to trace/follow manually. Patrick ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr