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 EAA25795; Thu, 14 Nov 2002 04:35:02 +0100 (MET) 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 EAA25812 for ; Thu, 14 Nov 2002 04:35:01 +0100 (MET) Received: from favie.faith.gr.jp (favie.faith.gr.jp [61.127.175.250]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gAE3YxX10122 for ; Thu, 14 Nov 2002 04:34:59 +0100 (MET) Received: from localhost (dhcp7.faith.gr.jp [192.168.1.17]) by favie.faith.gr.jp (8.9.3/8.9.3) with ESMTP id MAA14631; Thu, 14 Nov 2002 12:34:51 +0900 To: checker@d6.com Cc: caml-list@inria.fr Subject: Re: [Caml-list] labels and optional arguments in 3.06 In-Reply-To: <4.3.2.7.2.20021113184428.030a3a38@localhost> References: <200211132333.gADNXON14954@plinky.bolt-action.com> <20021114100554Q.garrigue@kurims.kyoto-u.ac.jp> <4.3.2.7.2.20021113184428.030a3a38@localhost> X-Mailer: Mew version 1.94.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20021114123418O.garrigue@kurims.kyoto-u.ac.jp> Date: Thu, 14 Nov 2002 12:34:18 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Chris Hecker > >val f : ~a:float -> ?a:float -> float -> float > > Why would this even be legal? Is there some reason to allow multiple > labels with the same name? There is a good reason to have it legal: there is no way to make it illegal. Suppose you have a polymorphic function: val g : f:'a -> a:int -> 'a # g ~f:(fun ~a -> not a);; - : a:int -> a:bool -> bool As long as we use normal type variables for function results, we must allow it. > Is there a problem with the behavior I want without duplicate labels? 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? Jacques Garrigue ------------------- 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