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
[Caml-list] Announcing ocalibs.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-05-16 (01:04)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Announcing ocalibs.
On Sun, 2004-05-16 at 06:57, Jere Sanisalo wrote:
> On Sat, May 15, 2004 at 10:48:25PM +0200, Nicolas Cannasse wrote:
> >However one of the problem when writing games with ocaml is the lack of
> >mutual recursives modules,

I would expect recursion is no problem for games because games
tend to need dynamic binding, which classes provide,
and recursion via class type abstraction works fine
across module boundaries.

The big problem with classes is *intramodule* type recursion,
since mutually recursive class types can't also
recurse with variants and tuples (at least they couldn't
last time I played with them).  To fix this you have to 
make your class polymorphic, and then instantiate
in an ordinary (recursive) type declaration.

Polymorphic variants may help with this since they
don't need to be declared.

John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net

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