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.2 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 58346BBAF for ; Thu, 20 Nov 2008 22:29:12 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8DAANlJUnCpx6wZGdsb2JhbACTTBoLCgYSvVmCfA X-IronPort-AV: E=Sophos;i="4.33,639,1220220000"; d="scan'208";a="17433740" Received: from smtpmin.univ-orleans.fr (HELO min.univ-orleans.fr) ([194.167.30.176]) by mail2-smtp-roc.national.inria.fr with ESMTP; 20 Nov 2008 22:29:12 +0100 Received: from smtps.univ-orleans.fr (localhost [127.0.0.1]) by min.univ-orleans.fr (Postfix) with ESMTP id 4C81D12B4D1 for ; Thu, 20 Nov 2008 22:29:12 +0100 (CET) Received: from [192.168.0.12] (ras75-4-82-235-58-110.fbx.proxad.net [82.235.58.110]) by smtps.univ-orleans.fr (Postfix) with ESMTP id 4355F36E60 for ; Thu, 20 Nov 2008 22:29:16 +0100 (CET) Subject: About namespaces From: David Rajchenbach-Teller To: Caml Content-Type: text/plain Date: Thu, 20 Nov 2008 22:29:16 +0100 Message-Id: <1227216556.7676.31.camel@Blefuscu> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; namespaces:01 ens-lyon:01 namespaces:01 mylist:01 off-list:01 camlp:01 findlib:01 statically:01 camlp:01 cheers:01 univ-orleans:01 lifo:01 liquidations:98 writes:01 modules:02 At the moment, there is no difference between modules and namespaces. Among other things, this means that if I write an extension MyList to List and someone else writes and extension HisList to List, there is no automated way to merge these, I need to write yet another module LatestList to be able to use both extensions at the same time. While this is certainly possible, it's also quite clumsy and prevents drop-in additions to existing modules (or hierarchies, yes) by third-party libraries, something which, as Richard Jones points out, may be important. All of this is due to the fact that modules are closed: once a module has been written, there is no way to add something to that module without altering the source code or writing a new module. Now, David Allsopp suggested (off-list) that we could perhaps implement namespaces as a Camlp4 extension, with the use of external configuration files (something which can already be managed with findlib). I'm shamelessly forwarding his idea and asking for feedback. Where we have [open List] to open one specific module called [List], we could introduce * [use List] to open all the modules registered as providing namespace [List] * [import List] to locally rebind [List] to a module obtained by including all the modules registered as providing namespace [List] In each case, finding out which modules are registered as providing namespace [List] is performed statically, by Camlp4 reading a set of external configuration files. What do you think? Cheers, David -- David Teller-Rajchenbach Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller Angry researcher: French Universities need reforms, but the LRU act brings liquidations.