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 GAA01739; Sun, 29 Aug 2004 06:45:41 +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 GAA04020 for ; Sun, 29 Aug 2004 06:45:40 +0200 (MET DST) Received: from nexus.stwing.upenn.edu (NEXUS.STWING.UPENN.EDU [165.123.132.61]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i7T4jdxe008167 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sun, 29 Aug 2004 06:45:40 +0200 Received: from force.stwing.upenn.edu (root@force.stwing.upenn.edu [165.123.132.65]) by nexus.stwing.upenn.edu (8.12.10/8.12.9) with ESMTP id i7T4jbSU008586 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sun, 29 Aug 2004 00:45:38 -0400 (EDT) Received: from force.stwing.upenn.edu (wlovas@localhost [127.0.0.1]) by force.stwing.upenn.edu (8.12.10/8.12.9) with ESMTP id i7T4jbh4028265 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 29 Aug 2004 00:45:37 -0400 (EDT) Received: (from wlovas@localhost) by force.stwing.upenn.edu (8.12.10/8.12.9/Submit) id i7T4jaEC028263 for caml-list@pauillac.inria.fr; Sun, 29 Aug 2004 00:45:36 -0400 (EDT) Date: Sun, 29 Aug 2004 00:45:36 -0400 From: William Lovas To: caml-list@pauillac.inria.fr Subject: Re: [Caml-list] baffled by semicolon Message-ID: <20040829044535.GA21833@force.stwing.upenn.edu> Mail-Followup-To: caml-list@pauillac.inria.fr References: <16685.22393.76718.150882@soggy.deldotd.com> <000401c48b23$cc26d630$0200a8c0@Vigo> <16685.28589.807412.69960@soggy.deldotd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16685.28589.807412.69960@soggy.deldotd.com> User-Agent: Mutt/1.5.4i X-Miltered: at concorde with ID 41315F73.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; lovas:01 wlovas:01 stwing:01 caml-list:01 baffled:01 semicolon:01 2004:99 woke:99 parses:01 tightly:01 0700,:01 o'caml:02 wrote:03 let:04 william:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Aug 25, 2004 at 10:05:49PM -0700, briand@aracnet.com wrote: > [...] > However your response woke up some neurons - why wouldn't it be : > > let w = (area#misc#realize ()); area#misc#window ;; ... and the easy way to remember the reason it parses this way is to recall that O'Caml is a *function*al language, so *function* application binds most tightly. :) So in ``area#misc#realize (); area#mist#window'', the application of ``area#misc#realize'' -- and not the `;' -- gets the (). It's the same as with things like ``f x + g 3'' (= ``(f x) + (g 3)'', not ``f (x + g) 3'', or any other weird thing like that). Hope this helps. cheers, William ------------------- 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