Browse thread
Re: [Caml-list] Polymorphic Variants and Number Parameterized Typ es
- Krishnaswami, Neel
[
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: | Krishnaswami, Neel <neelk@c...> |
| Subject: | Re: [Caml-list] Polymorphic Variants and Number Parameterized Typ es |
John Max Skaller [mailto:skaller@ozemail.com.au] wrote: > > > Hmmm... beginnners question on module system .. can you recurse on it? > I'm guessing not, since there are neither specialisations nor > overloading, there's be no way to stop the recursion. ..?? There's no recursion in the module system because that would break the termination guarantee. If you think of modules as records, and functors as lambda abstractions, you can see that the module system defines a simply-typed lambda calculus. As you've noticed with C++, adding recursion to it would mean you can write nonterminating module expressions. (All this is wonderfully clearly explained in the paper, "A modular module system".) I can see why having guaranteed termination is nice, though I do really miss having recursive modules. There are a lot of problems that decompose more nicely if you have cross-module recursion. -- Neel Krishnaswami neelk@cswcasa.com ------------------- 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