From: Francois Pottier <francois.pottier@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Functorizing large collections of modules
Date: Wed, 20 Mar 2002 10:09:24 +0100 [thread overview]
Message-ID: <20020320100924.A11574@pauillac.inria.fr> (raw)
In-Reply-To: <1016580458.10273.46.camel@dragonfly.localdomain>; from yminsky@cs.cornell.edu on Tue, Mar 19, 2002 at 06:27:36PM -0500
Hello,
Yaron M. Minsky writes:
> The solution suggested below clearly works, but it's just as clearly a
> bit of a hack.
You want Foo and Bar to exist within separate files, even though they are both
parameterized by the same module ZZp. This is, I believe, a frequent problem
for people trying to program in a modular way. It seems that, if you insist
that Foo and Bar should be separately compilable, then you must describe their
interface to the compiler, which means you must turn each of them into a
functor, parameterized over ZZp. This leads you to the solution that was
posted, which, I believe, is manageable to a certain degree. Now, if on the
other hand, you don't really care about separate compilation of Foo and Bar,
then you can place them in separate files, and have your Makefile
automatically catenate them for compilation. Given the speed of today's
machines, this solution should be acceptable in many cases. I don't know of a
third solution, but of course, I'd love to stand corrected.
> Another example of this weakness is the lack of support for namespaces.
It is true that O'Caml has little support for resolving name conflicts
in a modular way, because the semantics of the module language is too
intimately tied with the underlying file system. I suppose a CM-like tool
would help, but I think this issue is separate from the one above.
--
François Pottier
Francois.Pottier@inria.fr
http://pauillac.inria.fr/~fpottier/
-------------------
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
next prev parent reply other threads:[~2002-03-20 9:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-18 4:09 Yaron M. Minsky
2002-03-18 9:01 ` Remi VANICAT
2002-03-18 12:19 ` Yaron M. Minsky
2002-03-18 12:52 ` Sami Mäkelä
2002-03-19 23:27 ` Yaron M. Minsky
2002-03-19 23:44 ` Fermin Reig
2002-03-20 9:09 ` Francois Pottier [this message]
2002-03-20 11:24 ` Alain Frisch
2002-03-20 12:59 ` Yaron M. Minsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020320100924.A11574@pauillac.inria.fr \
--to=francois.pottier@inria.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox