From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id D75A6BBAF for ; Fri, 21 Nov 2008 13:37:14 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar0CAEo6JknBNu7+hWdsb2JhbACTWAEBAQoLCgUTwTeCfA X-IronPort-AV: E=Sophos;i="4.33,644,1220220000"; d="scan'208";a="20221323" Received: from amazone1.ujf-grenoble.fr ([193.54.238.254]) by mail1-smtp-roc.national.inria.fr with ESMTP; 21 Nov 2008 13:37:14 +0100 Received: from tana1.ujf-grenoble.fr (tana1.ujf-grenoble.fr [152.77.18.74]) by amazone1.ujf-grenoble.fr (8.13.7/8.13.7/Configured by JE 21 07 2006) with ESMTP id mALCbDxa066412; Fri, 21 Nov 2008 13:37:13 +0100 (CET) Received: from localhost (unknown [127.0.0.1]) by tana1.ujf-grenoble.fr (Postfix) with ESMTP id D63545645D; Fri, 21 Nov 2008 13:37:13 +0100 (CET) X-UJF-AV: Scanned on tana1.ujf-grenoble.fr Received: from tibre2.ujf-grenoble.fr (tibre2.ujf-grenoble.fr [152.77.24.10]) by tana1.ujf-grenoble.fr (Postfix) with ESMTP id 98D1E56432; Fri, 21 Nov 2008 13:37:13 +0100 (CET) Received: from fourier.ujf-grenoble.fr (fourier.ujf-grenoble.fr [193.54.241.15]) by tibre2.ujf-grenoble.fr (8.14.2/8.14.2/GB-Aout08) with ESMTP id mALCbDeR020408; Fri, 21 Nov 2008 13:37:13 +0100 (CET) (envelope-from Michael.Le-Barbier@laposte.net) Received: from localhost (localhost [127.0.0.1]) by fourier.ujf-grenoble.fr (Postfix) with ESMTP id 92402D02E9; Fri, 21 Nov 2008 13:37:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at fourier.ujf-grenoble.fr Received: from fourier.ujf-grenoble.fr ([127.0.0.1]) by localhost (fourier.ujf-grenoble.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ES06WxMnE3O2; Fri, 21 Nov 2008 13:37:22 +0100 (CET) Received: from [193.48.255.208] (vanparys.ujf-grenoble.fr [193.48.255.208]) by fourier.ujf-grenoble.fr (Postfix) with ESMTP id 710BBD0059; Fri, 21 Nov 2008 13:37:22 +0100 (CET) Message-ID: <4926AB88.5010700@laposte.net> Date: Fri, 21 Nov 2008 13:37:28 +0100 From: =?ISO-8859-1?Q?Micha=EBl_Le_Barbier?= User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: Erkki Seppala , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Wanted: your feedback on the hierarchy of OCaml Batteries Included References: <1227002178.6170.25.camel@Blefuscu> <20081118100625.GA25627@annexia.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; ocaml:01 0100,:01 enforces:01 cpan:01 cpan:01 wrote:01 caml-list:01 writes:01 modules:02 modules:02 underscore:02 underscore:02 external:03 external:03 module:03 Erkki Seppala a écrit : > Richard Jones writes: > > >> On Tue, Nov 18, 2008 at 10:56:18AM +0100, David Teller wrote: >> >>> open System.IO;; >>> open System.File;; >>> >> Your biggest problem is using dot ('.') instead of underscore ('_'). >> > > However, this would take away some of the benefits. For example I > prefer using the least amount of opening of modules, to make it easier > to see where the values come from, and let module S = System would > give me both IO and File reachable through S.IO and S.File I subscribe to Richard Jones and Zheng's comments, >> Using a dot means that the System namespace cannot be extended by >> external packages. If you use an underscore then an external package >> can extend the namespace (eg. by providing System_Newpackage) >> > I'm not sure how beneficial it would be that an external package can > extend the hierarchy anyway. Disllowing third parties to extend the namespace enforces organization of libraries in terms of PROVIDER, FUNCTIONNALITY. For the galaxy of small modules porviding multi-purpose functionnalities, hiding the provider from the name space makes programs and module lists more legible. For instance, in CPAN (Perl) providers does usually not appear in the namespace, and searching functionnalities in the wealth of modules in CPAN is made (more) easy by this.