From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA04287; Thu, 29 Mar 2001 11:46:55 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA04285 for ; Thu, 29 Mar 2001 11:46:51 +0200 (MET DST) Received: from miss.wu-wien.ac.at (miss.wu-wien.ac.at [137.208.107.17]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f2T9ko915823 for ; Thu, 29 Mar 2001 11:46:50 +0200 (MET DST) Received: (from mottl@localhost) by miss.wu-wien.ac.at (8.9.0/8.9.0) id LAA25653; Thu, 29 Mar 2001 11:46:40 +0200 (MET DST) Date: Thu, 29 Mar 2001 11:46:40 +0200 From: Markus Mottl To: Jacques Garrigue Cc: caml-list@inria.fr Subject: Re: [Caml-list] Future of labels Message-ID: <20010329114640.A18984@miss.wu-wien.ac.at> References: <20010329094438J.garrigue@kurims.kyoto-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010329094438J.garrigue@kurims.kyoto-u.ac.jp>; from garrigue@kurims.kyoto-u.ac.jp on Thu, Mar 29, 2001 at 09:44:38 +0900 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, here are my two cents on labels (I am a classic mode user). Note that I am not trying to make a suggestion on future directions, but only explaining where I personally found them useful so far and where not and why. On Thu, 29 Mar 2001, Jacques Garrigue wrote: > In particular arguments for keeping a classic mode are: > * having labels in the standard library > * using decorative labels in one's own programs/interfaces > (something people asked for before ocaml 3.00) > * allowing different styles depending on whether you care about > commutation or not For me actually none of the above is an argument why I am a classic mode user: I don't use labels in the standard library, never use labels for decorative purposes (identifier names of arguments should have an intuitive name already) and do not need commutation (I do not even commute optional arguments in my code unless this happens implicitly if an argument is not provided). To my disadvantage, I have always found it easier to remember numbers (e.g. positions; phone numbers; ...) than names (e.g. identifiers; names of people; ...). Thus, memorizing the order of arguments is in most cases easier for me than remembering their label names. But this may be only a habit that comes from constant training - maybe I'd become a more social being through the use of labels ;) Still, I find labels very useful for one specific purpose: optional arguments. They are the most reasonable alternative to providing defaults for function arguments that I know of. Libraries with functions that require a huge amount of parameters for providing fully-featured functionality (e.g. as in my Pcre and Lacaml libraries) only become really convenient with optional arguments. One well-known reason for avoiding fully commuting labels is the problems they create with the use of higher-order functions. Since I make very frequent use of those, they would make life with label mode quite hard, I fear. > Personally, if there is no support for classic mode as it is, removing > it would simplify things. There are so few labels left in the standard > library that removing them would not be a big pain. The problem of > other libraries, and particularly Unix, needs more work, but I would > think it could be solved, if in particular people are really ready to > write labels when they use 3rd party libraries. It is surely necessary to settle on one mode soon: a split user community using different programming styles is surely detriment to the further growth of OCaml. I'd be particularly interested in learning about the experience of people who decided to move from classic mode to label mode or vice versa as opposed to the experience of people who started out with one mode right away. It is probably not so much the different modes itself that people are afraid of but the effort of moving combined with the risk that the other mode may not be as convenient as the one they are used to. Any comments? Regards, Markus Mottl -- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr