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=4.1 required=5.0 tests=AWL,DNS_FROM_RFC_POST, DNS_FROM_SECURITYSAGE,SPF_NEUTRAL 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 8459CBBAF for ; Thu, 20 Nov 2008 12:32:51 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvMAAH/ZJElIDtyYkGdsb2JhbACTHT4BAQEBCQkMBxEDsnKLHgEDAQOCeYIP X-IronPort-AV: E=Sophos;i="4.33,639,1220220000"; d="scan'208";a="20169603" Received: from fg-out-1718.google.com ([72.14.220.152]) by mail1-smtp-roc.national.inria.fr with ESMTP; 20 Nov 2008 12:32:51 +0100 Received: by fg-out-1718.google.com with SMTP id l27so310964fgb.43 for ; Thu, 20 Nov 2008 03:32:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer:sender; bh=ahyEGYf/ESC9ahV7QwVFWu03hr+m+cxhPB8RKfBh7KU=; b=EQ1xaHiLS2cCDgeoIWf3eXnVLx7lS7lVegUKhwsk2ei+3ILksf3ZpeHwJk4SprpCc7 M+ptdg1APH6Ian7coSRkUSwfleEStA7lZDuGJPPWApBDx17NHfPIV9/4NirU8Xnzu4Oz scQLcOFe1l8Yw/3PF7/qZD3960MORjPWdOJw4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer:sender; b=QHSy77iZk8u5ltdJ+41KB8SjiVb4+hqY5CGB6nRuu25duJVM3Qwqtv9JImD+A5vcru KA61RVj+T65vSe+Fv1nn7X4bsLlsyBd7c0rcmHRdoQxdAFNFjDg2Q3TjtSwCcFZQG5sq tBCxLRgOUWJ6xYFl5Zz81ammFt2zQf94DtR9I= Received: by 10.86.59.18 with SMTP id h18mr1490456fga.42.1227180770854; Thu, 20 Nov 2008 03:32:50 -0800 (PST) Received: from ?192.168.1.34? (236-50.76-83.cust.bluewin.ch [83.76.50.236]) by mx.google.com with ESMTPS id d4sm2275863fga.5.2008.11.20.03.32.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 20 Nov 2008 03:32:50 -0800 (PST) Message-Id: From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= To: OCaml List In-Reply-To: <20081120104914.GA14355@usha.takhisis.invalid> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: [Caml-list] open Module (not?) considered harmful Date: Thu, 20 Nov 2008 12:31:47 +0100 References: <1227002178.6170.25.camel@Blefuscu> <200811182330.03947.jon@ffconsultancy.com> <1227076192.6290.7.camel@Blefuscu> <4b5157c30811190146l2c6a5e2cv4a085bcc14ae5f4@mail.gmail.com> <20081119211124.51610ae9@alcazar.inria.fr> <1227172839-sup-5973@ausone.inria.fr> <20081120103303.GA25346@annexia.org> <20081120104914.GA14355@usha.takhisis.invalid> X-Mailer: Apple Mail (2.929.2) Sender: =?UTF-8?B?RGFuaWVsIELDvG56bGk=?= X-Spam: no; 0.00; bunzli:01 buenzli:01 zacchiroli:01 invoke:01 imho:01 caml-list:01 modules:02 modules:02 defined:02 external:03 intrinsic:03 module:03 module:03 hierarchy:03 implicit:03 Le 20 nov. 08 =E0 11:49, Stefano Zacchiroli a =E9crit : > Problem 1) once you open you loose the information where an identifier > comes from. True, but it is a tool deficiency, not an intrinsic > deficiency. I disagree. Having to invoke a tool to know where an identifier comes =20= from when I read code involves one more (superfluous IMHO) action. Not =20= to mention that I do sometimes print code on real paper to read it. I want to be able to read code without the need of invoking tools =20 every two lines, thus I try to follow this policy : - Any non prefixed identifier in a file is defined in that file. This makes reading and navigating through the code much more easier. =20 The less there are implicit definitions in my code, the better. I do not object using open for external libraries that pack some =20 related _modules_ in a _single level_ hierarchy but I clearly see no =20 benefit of having to open things to use the standard library =20 (especially to use something as ubiquituous as lists). > Problem 2) "open Module" is too broad, hence it "splice in" the > current scope all identifiers of Module. This problem doesn't occur if you pack only closely related _modules_ =20= in the module you open. Best, Daniel