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 GAA27241; Thu, 14 Nov 2002 06:03:56 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 GAA27240 for ; Thu, 14 Nov 2002 06:03:55 +0100 (MET) Received: from relay.pair.com (relay1.pair.com [209.68.1.20]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id gAE53s118792 for ; Thu, 14 Nov 2002 06:03:54 +0100 (MET) Received: (qmail 91405 invoked from network); 14 Nov 2002 05:01:33 -0000 Received: from arda.pair.com (HELO compaqreview.d6.com) (209.68.1.133) by relay1.pair.com with SMTP; 14 Nov 2002 05:01:33 -0000 X-pair-Authenticated: 209.68.1.133 Message-Id: <4.3.2.7.2.20021113204718.031fa750@localhost> X-Sender: checker@localhost X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Wed, 13 Nov 2002 20:57:08 -0800 To: Jacques Garrigue From: Chris Hecker Subject: Re: [Caml-list] labels and optional arguments in 3.06 Cc: caml-list@inria.fr In-Reply-To: <20021114123418O.garrigue@kurims.kyoto-u.ac.jp> References: <4.3.2.7.2.20021113184428.030a3a38@localhost> <200211132333.gADNXON14954@plinky.bolt-action.com> <20021114100554Q.garrigue@kurims.kyoto-u.ac.jp> <4.3.2.7.2.20021113184428.030a3a38@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >Indeed, that would leave no ambiguity. So it might be ok to allow >mixing labelled optional arguments in an otherwise unlabelled >application, if there is no ambiguity on labels. But is it really >worth a strange definition, when the workaround is just to add >parentheses? I appreciate your point here about compiler complexity, but I'd say the answer is yes. The parentheses just add to the syntactic mess, they don't help with it and make things clearer (which is the original point of labels). It's preferable to just not use the labels than to bizarrely parenthesize functions, I think. Imagine reading some code and looking at a function call with parentheses like that, knowing that currying makes it so there's no need for them if there were no labels. You'd have to stop and think about what was going on. So, I'd say that's a readability lose. It'd be better to just punt the labels and optional arguments altogether, because at least then the code is "normal". But, that's a lose too, since optional arguments are very useful. Plus, the ambiguity wouldn't come up very often, so overall it's an intuitive win as well. How hard would it be to implement this rule? Chris ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners