Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] ocaml-classes-3.05
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: james woodyatt <jhw@w...>
Subject: Re: [Caml-list] ocaml-classes-3.05
On Monday, Aug 5, 2002, at 17:13 US/Pacific, Jacques Garrigue wrote:
> From: Oleg <>
>> Jacques, what are the advantages of using the OO wrappers over the
>> corresponding modules from the standard distribution?
> None.
> You don't get more features.

Actually... not true.  You get the ability to override the methods by 
inheritance.  In exchange for this feature, you pay a not insignificant 
cost in initialization time and program codespace.  Whether this trade 
is a good one is open to interpretation.

> But it felt strange at the beginning to have an OO languages with no
> basic classes. So I quickly wrote those, and apparently some people
> are using them. They may like the oo syntax, or the customizability.

It felt strange to me at first too.  The feeling eventually passed when 
I fully understood what is really easier to do with classes and class 
types than with modules, signatures and functors.

My advice: Use the most basic syntax the language provides to do the 
basics.  Use objects and methods only when functions (including 
higher-order functions) are insufficient.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: