From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA07230 for caml-redistribution@pauillac.inria.fr; Fri, 17 Mar 2000 19:32:11 +0100 (MET) Resent-Message-Id: <200003171832.TAA07230@pauillac.inria.fr> Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA21638 for ; Fri, 17 Mar 2000 18:05:16 +0100 (MET) Received: from mail2.microsoft.com (mail2.microsoft.com [131.107.3.124]) by nez-perce.inria.fr (8.8.7/8.8.7) with SMTP id SAA20007 for ; Fri, 17 Mar 2000 18:05:14 +0100 (MET) Received: from 157.54.9.104 by mail2.microsoft.com (InterScan E-Mail VirusWall NT); Fri, 17 Mar 2000 09:04:03 -0800 (Pacific Standard Time) Received: by INET-IMC-02 with Internet Mail Service (5.5.2651.58) id ; Fri, 17 Mar 2000 09:04:02 -0800 Message-ID: <39ADCF833E74D111A2D700805F1951EF18014511@RED-MSG-06> From: Don Syme To: "'Jacques Garrigue'" , "'caml-list@inria.fr'" Subject: RE: Syntax for label, NEW PROPOSAL Date: Fri, 17 Mar 2000 09:03:56 -0800 X-Mailer: Internet Mail Service (5.5.2651.58) Resent-From: weis@pauillac.inria.fr Resent-Date: Fri, 17 Mar 2000 19:32:11 +0100 Resent-To: caml-redistribution@pauillac.inria.fr I really don't see people clamouring for lots of labels in the standard library (besides the inventors of the language feature, who don't really count, for lots of obvious reasons - over exposure to the feature, over familiarity with the label names, a natural bent to program in a particular way that led them to the feature in the first place, self-selection as people who think the feature is the best thing ever). I reiterate my bottom line: only add labels to a particular function if you can strongly argue that they will actually decrease the number of mistakes made by typical users that are not already caught by the typechecker. Don't argue about "labels being good practice" - programmers don't care about what someone else sees as good practice (we'd all be using Ada if they did) - they care about getting 90% of their code right first time, which is what the Caml type checker already ensures. That is, you need to argue when and where labels are _good_, and not just why they are _harmless_. (And in the world of language design, no extra language feature is truly harmless). IMHO, one of the only functions in the standard library that comes close to needing labels is "blit", and I've already argued why it's marginal that they are even of much help there. Four more points: o The fact that you've had to resort to "modes" at all indicates something is wrong. The point about O'Caml is that you shouldn't have to understand _anything_ about labels, objects, modules or syntax modes to use the system as a new user. You shouldn't have to see any labels, nor have to ask "what are these two modes all about", nor have to try to understand why some of the arguments have labels and some don't. o The "just documentation" response doesn't really hold water, because if the labels were just documentation, then they would different. For example, "fun", being a keyword, is highly confusing and not terribly descriptive - any sensible prototype would probably just use "f". And C prototypes look _horrible_ when you have both higher order arguments and argument names. o A quick poll of 2 of my Standard ML friends down the corridor about what they think of labels going in the standard library, and they all said "gross". o To ensure "living happily together", my feeling is you should leave the standard library alone (though I could live with 2 or 3 functions having labels), but go wild with labels and variants in the places were no one doubts they will be useful. Cheers! Don -----Original Message----- From: Jacques Garrigue [mailto:garrigue@kurims.kyoto-u.ac.jp] Sent: 17 March 2000 15:23 To: caml-redistribution@pauillac.inria.fr Subject: RE: Syntax for label, NEW PROPOSAL Having seen a number of recent messages against having labels in the standard library, I have the feeling that there is a lot of confusion here, and I would like to make a few points clear. * In default (classic) mode, writing labels is (and will stay) not required. For those users that do not like labels, or do not want to bother with them, or just are starting to learn ML, labels in the standard library are just some form of documentation, like argument names in C prototypes. Honestly, I have never heard anybody protesting against having argument names in C prototypes. * While not requiring labels, classic mode provides some support for them, meaning that casual users can put some labels in their programs if they want. This also means that any library written in modern mode (where labels matter) will be available with the same comfort in both classic and modern mode, and, more interestingly, according to the _user_'s taste rather than to the implementor's. * What we are discussing about is modern mode. This is not pedantic mode, this is just another typing discipline. This basically doesn't concern people who are not very fond of labels, and will be perfectly happy with classic mode. * Pierre expressed his concern that modern mode would make more difficult some nice programming style. I perfectly agree with him, but I think this specific problem can be solved without removing labels from the library. Looking at the messages, there are clearly people who prefer (heavily) labelled style, and others who prefer fewer or no labels. But they all agree that Caml is and should stay a great _functional_ language. Let's all live happily together: modern and classic mode are there for that! Jacques