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] recursive modules redux, & interface files
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-03-23 (12:18)
From: Fabrice Le Fessant <fabrice.le_fessant@i...>
Subject: Re: [Caml-list] recursive modules redux, & interface files

Why don't you use classes ? You can define classes with "virtual"
methods for the functions you will not define immediatly, and then
define them in another module. Later, you can create a class which
inherit from both classes, thus binding correctly all variables.

Isn't "late binding" the only interest of objects ? :) 

Of course, this only works for functions. For types, you should use
a separate module. Some time ago, I wrote a patch to ocaml to allow
C-like linking under some conditions. I can update it to 3.01 if you
are interested.

- Fabrice

To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr