[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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