English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Wanted: your feedback on the hierarchy of OCaml Batteries Included
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-11-23 (11:01)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] open Module (not?) considered harmful
On Sun, Nov 23, 2008 at 11:38:17AM +0100, Stefano Zacchiroli wrote:
> On Thu, Nov 20, 2008 at 11:41:03AM +0000, Richard Jones wrote:
> > >   The most straightforward solution to this problem to me looks like
> > >   providing a syntax equivalent like "from Module import foo, bar"
> > >   which selectively imports only some identifiers from a given module.
> > 
> > Again, Perl gets this mostly right, in that the module developer can
> > define "modes of use" of the module.  In Perl something like:
> > 
> >   use CGI qw(:standard);
> That's interesting, but requires support in all involved library. Do
> you know how CPAN authors are required to annotate what is "standard"
> and what is not?

It's left to the module authors to define how these labels work,
although there are a lot of idiomatic uses.


Richard Jones
Red Hat