Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] CTAN/CPAN for Caml (COCAN ...?)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: james woodyatt <jhw@w...>
Subject: Re: [Caml-list] GODI (was: CTAN/CPAN for Caml (COCAN ...?))
On Sunday, Jul 20, 2003, at 11:30 US/Pacific, Christian Lindig wrote:
>
> This is a fresh idea. But I get the impression that the essence of it 
> is
> to decouple the name of a module from the name of the file that 
> contains
> it.  Somebody suggested already an -alias directive for similar
> purposes.
>
> We have to decide whether we want this decoupling to happen at the 
> level
> of the language (i.e. new syntax), or only the level of its
> implementation (i.e. new compiler flags). Right now, the mapping of
> module names to files is a matter of the compiler and mostly invisible
> at the language level.

Yeah, the more I think about this problem, the more convinced I am that 
the only way to solve the problem well enough to quiet the bulk of the 
complaining is to do something-- in the syntax of the language-- to 
couple the *name* of a module with the globally unique *identifier* of 
the library that contains it.

It seems to me that the compiler and the linker should be taught that 
all libraries have a hierarchical URI attributed to them.  These would 
not be locators.  They would be identifiers.

More importantly, to quiet the complaints about the real problem at 
hand-- promoting code re-use-- there should be new language syntax for 
specifying module paths to include the URI of the library.  I hesitate 
to propose one, but Gerd may be onto something:

	module Q = Queue[http://ocaml.org/lib/3.1]

There should also be well-defined functions for turning a library URI 
into an appropriate URL, e.g. a file:-scheme URL for local library 
paths, an http:-scheme URL for web library paths, etc.

That's my take.  I hope it doesn't suck.


-- 
j h woodyatt <jhw@wetware.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