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 MAA20206; Tue, 2 Sep 2003 12:26:18 +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 MAA20975 for ; Tue, 2 Sep 2003 12:26:17 +0200 (MET DST) Received: from ep09.kernel.pl (ep09.kernel.pl [212.87.11.162]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h82AQGf11754 for ; Tue, 2 Sep 2003 12:26:16 +0200 (MET DST) Received: (qmail 31473 invoked by uid 566); 2 Sep 2003 10:26:13 -0000 Date: Tue, 2 Sep 2003 12:26:13 +0200 From: Michal Moskal To: Lukasz Stafiniak Cc: caml-list@inria.fr Subject: Re: [Caml-list] Let-in vs beta-redex Message-ID: <20030902102613.GA19386@ep09.kernel.pl> References: <000e01c370a4$592d6300$3bef4dd5@ppp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000e01c370a4$592d6300$3bef4dd5@ppp> User-Agent: Mutt/1.4.1i X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; michal:01 moskal:01 malekith:01 pld-linux:01 caml-list:01 lukasz:01 michal:01 moskal:01 malekith:01 wroclaw:01 kernel:01 0200,:01 sep:01 typing:03 gcs:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Sep 01, 2003 at 06:15:54PM +0200, Lukasz Stafiniak wrote: > Hi, > > Is let-in more efficient than beta-redex or are they computationally > equivalent? Is let-in a syntax-sugar of beta-redex? > > E.g. > > let x = sin 2. in x *. x *. x;; > > (fun x -> x *. x *. x) (sin 2.);; let in is *not* equivalent to beta-redex because of typing. Type variables are not generalized in beta-redex, for example consider: let id x = x in (id 1, id true) vs. (fun id -> (id 1, id true)) (fun x -> x) -- : Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv : PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h ------------------- 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