English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
RE: [Caml-list] Some Clarifications
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-07-27 (11:54)
From: Robert Roessler <roessler@r...>
Subject: Re: [Caml-list] Some Clarifications
Jon Harrop wrote:

> ...
> Of the OCaml code which I have studied, the OCaml compilers make scarce use of 
> objects, the stdlib makes no use (IIRC), the third party data structures and 
> algorithms that I use also make no use of OO but lablgtk uses OO and I have 
> one friend who has tried using OO in his own OCaml work.

The body of the OCaml implementation itself may not represent the best 
sample set for making this type of observation: in historical context, 
the "O" of OCaml came along relatively late in the project's life, and 
I do not believe that the compilers and standard library code were 
redesigned and reimplemented from the ground up once the "O" was present.

> In my code, I have used an object once, in order to circumvent a typing 
> problem. I have never successfully used OO in OCaml.

An object certainly seems a natural and concise way to represent a 
"state-holder-with-structured-access" - and I have done just that in a 
small OCaml project... but that could be the Smalltalk and C++ in my 
background talking. :)

Robert Roessler