Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] naming conflicts (was: camlimages vs. labltk)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Benjamin C. Pierce <bcpierce@s...>
Subject: Re: [Caml-list] naming conflicts (was: camlimages vs. labltk)
> Now that I think about it, I think both problems could be solved
> by changing toplevel modules into functors (instead of modules with
> free variables).  Then we only need a small linking language to tell
> which export to use to satisfy each import.  With suitable defaults
> (an import is satisfied by the export of the same name), this could
> be made compatible with the current system.

Wouldn't this create all sorts of problems with coherence (requiring
sharing declarations to fix)?  

The big difference between a functor and a module with a free variable is
that if you have *two* modules and you see the same variable name
occuring in them, you can be sure that, at link time, these names will
get bound to the same module, so no need for sharing declarations.  If
you change to functors (naively, anyway), you lose this guarantee.
 
     - B


-------------------
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