Browse thread
[Caml-list] Peut on unifier foncteurs et objets ?
[
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: | John Prevost <j.prevost@g...> |
| Subject: | Re: [Caml-list] Peut on unifier foncteurs et objets ? |
Please forgive me if I make some mistakes in interpreting your message. My French is not good at all. I believe the message was talking about the merging of modules/functors and objects, and how there is a lot of redundancy in O'Caml already, and that's not necessarily a bad thing. My feeling about modules and objects is not that they should be in any way unified--they do indeed serve different roles. What I *would* like to see is a bit better support when the two things are used together. The recent thread about how to write the functor such that it takes in a module with a class in it and uses that class is a good example of a rough spot--you can manipulate the type part of a class like it is a type. You can wrap the "new blah" construct in an actual function. But you cannot truly express in a functor that "module F (A : MT_Having_Class_Cl) : MT_Having_Other_Class_Cl with class cl = A.cl" It is this sort of difficulty that can scare a user of objects away from using functors, even when functors do suit their needs admirably. I'd also suggest that some advanced examples of modules and functors sans objects might be nice to have in the manual--but that's really something that can be done by the community (and outside the manual.) John. ------------------- 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