Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] What are Classes for in O'Caml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: brogoff@s...
Subject: Re: [Caml-list] What are Classes for in O'Caml?
On Fri, 8 Nov 2002, Michael Wohlwend wrote:
> I got to ocaml two weeks ago and the first thing I realized was that due the 
> the functional programming style and the module system the need for 
> oo-programming is much lower than with imperative style languages (at least 
> for me).

I tend to use the class system to ameliorate the annoying limitations of 
OCaml records. You know, no overloaded field labels, functions can't be 
polymorphic over a set of labels, that kind of thing. I'd be thrilled if 
I could have all of this stuff in a record system and get pattern matching 
back.

> Has somone found a *best* solution (for his tasks) to combine them (classes 
> und modules) or is it really just a matter of taste?

In addition to the O'Reilly book and Xavier's talk slides, take a gander at 
Didier Remy's APPSEM notes, where he discusses this issue in detail, and 
provides pointers to a symbolic algebra program which uses modules and 
classes together. 

-- 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