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 QAA28089; Thu, 15 Jul 2004 16:12:09 +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 QAA28659 for ; Thu, 15 Jul 2004 16:12:08 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i6FEC6SH000771 for ; Thu, 15 Jul 2004 16:12:07 +0200 Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3p2-20030924/3.7W) with ESMTP id XAA19946; Thu, 15 Jul 2004 23:11:53 +0900 (JST) Date: Thu, 15 Jul 2004 23:11:53 +0900 (JST) Message-Id: <20040715.231153.68538428.garrigue@kurims.kyoto-u.ac.jp> To: durak@liafa.jussieu.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] Optional and mandatory labels with the same name in the same function ? From: Jacques GARRIGUE In-Reply-To: <20040715115433.GA29454@liafa.jussieu.fr> References: <20040715115433.GA29454@liafa.jussieu.fr> X-Mailer: Mew version 4.0.64 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 40F690B6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 jacques:01 berke:01 durak:01 durak:01 val:01 jacques:01 semantics:01 ocaml:01 int:01 garrigue:01 garrigue:01 labels:01 unit:03 suppose:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Berke Durak > Has the following any use, and if not, shouldn't Ocaml better give a > warning ? > > # let f ?gogo ~gogo () = 33;; > val f : ?gogo:'a -> gogo:'b -> unit -> int = > Then I suppose that let f x x = 33 should also cause a warning, because this has just the same semantics. If your question was, is it possible to call such a function, then the answer is yes: f ~gogo:1 ~gogo:2 () 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