Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Error during partial linking
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dmitry Bely <dbely@m...>
Subject: Re: [Caml-list] Error during partial linking
brogoff@speakeasy.net writes:

>> Coming back to your initial desire to "pack" Baire (if I may say so),
>> I would very strong advise Diego to name his "List" module something
>> else, to avoid conflict with the standard library module of the same
>> name.  The hypothesis that compilation units are identified by unique
>> names is really essential to the way the OCaml compilers work.  I know
>> it's sometimes an annoyance (all cool names are already taken by the
>> standard lib :-), but you're really going to run into trouble with
>> name conflicts.
>
> This is one of those things that's always troubled me (perhaps there's another 
> petty complaint coming up) about OCaml. In a language with a hierarchical 
> module system, it seems that we should be able to avoid such problems by 
> having the standard library packages nested under a "Std" module, or something 
> like that, so that List, Array, etc., become Std.List, Std.Array, etc, as we 
> do now for the labeled modules.

That was exactly my proposal some time ago:

http://caml.inria.fr/archives/200208/msg00432.html

> I suppose it's too late now for such a change,

No way! It would only require adding "open Std" to the existing
sources. But we can even introduce it transparately (although I think it is
really not necessary): open Std by default (like Pervasives) and having a
compiler flag "-nostd" (like "-nopervasives") to disable this auto open.

> but I'm pretty sympathetic to 
> people who grouse over the fact that lots of good names are taken. 

Everybody except Ocaml developers seems to agree that the standard library
in Std module is a good idea :-)

- Dmitry Bely


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