Re: [Caml-list] open Module (not?) considered harmful

2008-11-23 Thread Stefano Zacchiroli
On Thu, Nov 20, 2008 at 12:31:47PM +0100, Daniel Bünzli wrote: I disagree. Having to invoke a tool to know where an identifier comes from when I read code involves one more (superfluous IMHO) action. Not to mention that I do sometimes print code on real paper to read it. Fair enough. Once

Re: [Caml-list] open Module (not?) considered harmful

2008-11-23 Thread Stefano Zacchiroli
On Thu, Nov 20, 2008 at 11:41:03AM +, 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

RE: [Caml-list] open Module (not?) considered harmful

2008-11-20 Thread David Allsopp
On 20 November 2008 10:49, Stefano Zacchiroli wrote: On Thu, Nov 20, 2008 at 10:33:03AM +, Richard Jones wrote: Encouraging developers to open modules is also usually a bad idea, except in very limited circumstances (hello Printf). Why? You and others failed me to convince of this. Or,

Re: [Caml-list] open Module (not?) considered harmful

2008-11-20 Thread Daniel Bünzli
Le 20 nov. 08 à 11:49, Stefano Zacchiroli a écrit : 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 from when I read

Re: [Caml-list] open Module (not?) considered harmful

2008-11-20 Thread Richard Jones
On Thu, Nov 20, 2008 at 11:49:14AM +0100, Stefano Zacchiroli wrote: On Thu, Nov 20, 2008 at 10:33:03AM +, Richard Jones wrote: Encouraging developers to open modules is also usually a bad idea, except in very limited circumstances (hello Printf). Why? You and others failed me to

Re: [Caml-list] open Module (not?) considered harmful

2008-11-20 Thread Richard Jones
On Thu, Nov 20, 2008 at 11:29:44AM -, David Allsopp wrote: Consider open Array;; open List;; (* Hundreds of lines of code *) length [];; Oh god yes, I was bitten by almost this just a few days ago, except my code was: open Printf open Format (*...*) printf I'm trying to

RE: [Caml-list] open Module (not?) considered harmful

2008-11-20 Thread Nicolas Pouillard
Excerpts from David Allsopp's message of Thu Nov 20 11:29:44 UTC 2008: On 20 November 2008 10:49, Stefano Zacchiroli wrote: On Thu, Nov 20, 2008 at 10:33:03AM +, Richard Jones wrote: Encouraging developers to open modules is also usually a bad idea, except in very limited

RE: [Caml-list] open Module (not?) considered harmful

2008-11-20 Thread Nicolas Pouillard
Excerpts from Nicolas Pouillard's message of Thu Nov 20 14:01:53 +0100 2008: Excerpts from David Allsopp's message of Thu Nov 20 11:29:44 UTC 2008: On 20 November 2008 10:49, Stefano Zacchiroli wrote: On Thu, Nov 20, 2008 at 10:33:03AM +, Richard Jones wrote: Encouraging developers

Re: [Caml-list] open Module (not?) considered harmful

2008-11-20 Thread Ashish Agarwal
Consider open Array;; open List;; I doubt anyone is recommending this. The module design dictates, to some extent, whether the module should be opened. Array and List clearly should not since they have commonly used function names. However, the proposed Data.Containers certainly should be

Re: [Caml-list] open Module (not?) considered harmful

2008-11-20 Thread Stefano Zacchiroli
On Thu, Nov 20, 2008 at 02:41:12PM +0100, Nicolas Pouillard wrote: Given the crowd of people wanting it, I've added a link [1] to the camlp4 wiki [2] :) Erm, given the crowd of people wanting it, what about including it in legacy camlp4? :-) -- Stefano Zacchiroli -o- PhD in Computer Science \

Re: [Caml-list] open Module (not?) considered harmful

2008-11-20 Thread Stefano Zacchiroli
On Thu, Nov 20, 2008 at 11:29:44AM -, David Allsopp wrote: Why? You and others failed me to convince of this. Or, better, I'm sure there are problems with that, but they just show deficiencies inherited from other parts of the language. Consider open Array;; open List;; You are

Re: [Caml-list] open Module (not?) considered harmful

2008-11-20 Thread Stefano Zacchiroli
On Thu, Nov 20, 2008 at 11:48:57AM +, Richard Jones wrote: open Printf open Format Let me stress once more that the Batteries hierarchy is not advertising anything like that. What is advertising (modulo syntax extensions helping out) is to open partial module paths which just contain