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 QAA14063; Thu, 22 Aug 2002 16:07:19 +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 QAA13591 for ; Thu, 22 Aug 2002 16:07:18 +0200 (MET DST) Received: from mel-rto6.wanadoo.fr (smtp-out-6.wanadoo.fr [193.252.19.25]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g7ME7Hr25913 for ; Thu, 22 Aug 2002 16:07:18 +0200 (MET DST) Received: from mel-rta10.wanadoo.fr (193.252.19.193) by mel-rto6.wanadoo.fr (6.5.007) id 3D6246E8000DDDBD for caml-list@inria.fr; Thu, 22 Aug 2002 16:07:17 +0200 Received: from debian (80.8.82.118) by mel-rta10.wanadoo.fr (6.5.007) id 3D49FFDD00757417 for caml-list@inria.fr; Thu, 22 Aug 2002 16:07:17 +0200 Received: from moi by debian with local (Exim 3.35 #1 (Debian)) id 17hscM-0001H6-00 for ; Thu, 22 Aug 2002 16:07:22 +0200 To: caml-list@inria.fr Subject: Re: [Caml-list] Calling a function with a self-defined type as argument References: Mail-Copy-To: never From: Remi VANICAT Date: Thu, 22 Aug 2002 16:07:22 +0200 In-Reply-To: (Oliver Bandel's message of "Thu, 22 Aug 2002 14:47:26 +0200 (MET DST)") Message-ID: <87d6sb56n9.dlv@wanadoo.fr> User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Oliver Bandel writes: > On 22 Aug 2002, Dimitri Ara wrote: > >> Thus f x (y) means f x y and >> `x Line ("")' means `x Line ""'. > > OK. > But why has the Line()-argument not a higher pruiority than the > function-call? > The Line()-argument is only complete, if it get's it's > args. And the type-declaration says in detail, how to > handle the Line(). Well, imagine that the compiler do what you want, and imagine that you have to read a code coding from someone using strange name. then when you read a code like : x Azerty "" you won't know if it is x (Azerty "") or (x Azerty) "" without reading the declaration of Azerty. Thanks to the way the language (and compiler) actually work, I can say that it is the first solution, even if I don't know what is this Azerty constructor. -- Rémi Vanicat vanicat@labri.u-bordeaux.fr http://dept-info.labri.u-bordeaux.fr/~vanicat ------------------- 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