From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 5B966BB84 for ; Tue, 7 Oct 2008 14:50:15 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0BAJv36kjUGypBmmdsb2JhbACBcooYh1kBAQEBAQgLCgcRA6Ish3KBag X-IronPort-AV: E=Sophos;i="4.33,372,1220220000"; d="asc'?scan'208";a="18358548" Received: from smtp8-g19.free.fr ([212.27.42.65]) by mail1-smtp-roc.national.inria.fr with ESMTP; 07 Oct 2008 14:50:15 +0200 Received: from smtp8-g19.free.fr (localhost [127.0.0.1]) by smtp8-g19.free.fr (Postfix) with ESMTP id 09A9332A800; Tue, 7 Oct 2008 14:50:15 +0200 (CEST) Received: from ausone.inria.fr (home.feydakins.org [82.229.164.236]) by smtp8-g19.free.fr (Postfix) with SMTP id B69FC32A7C0; Tue, 7 Oct 2008 14:50:14 +0200 (CEST) Received: by ausone.inria.fr (sSMTP sendmail emulation); Tue, _d Oct 2008 14:49:29 +0200 From: "Nicolas Pouillard" Cc: Caml_mailing list Subject: Re: [Caml-list] Re: Metaprogramming features To: jonathandeanharrop References: <884069.59268.qm@web54601.mail.re2.yahoo.com> <200810061656.42903.jon@ffconsultancy.com> <200810070117.13329.jon@ffconsultancy.com> In-Reply-To: <200810070117.13329.jon@ffconsultancy.com> Date: Tue, 07 Oct 2008 14:49:29 +0200 Message-Id: <1223383737-sup-3904@ausone.local> User-Agent: Sup/git Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=-1223383769-216283-27239-3251-3-="; micalg="pgp-sha1" MIME-Version: 1.0 X-Spam: no; 0.00; gmane:01 staged:01 printf:01 printf:01 discrepancy:01 unbound:01 wrote:01 wrote:01 caml-list:01 exceptions:01 int:01 int:01 caml:02 latter:03 let:03 X-Attachments: cset="UTF-8" type="application/pgp-signature" name="signature.asc" name="signature.asc" --=-1223383769-216283-27239-3251-3-= Content-Type: text/plain; charset=UTF-8 Excerpts from jonathandeanharrop's message of Tue Oct 07 02:17:13 +0200 2008: > On Monday 06 October 2008 17:46:49 Chung-chieh Shan wrote: > > Jon Harrop wrote in article > <200810061656.42903.jon@ffconsultancy.com> in gmane.comp.lang.caml.inria: > > > Exactly. The difference is (only) the performance characteristics. > > > > To the contrary, that is not the only difference; the timing of > > side effects (including non-termination and exceptions) can also be > > different. We give an example at the beginning of our Section 2. > > I don't follow. Your paper translates the following staged function: > > let power7 : int -> int = > .! . .~(Printf.printf "power\n"; power 7 ..)>.;; > > into this: > > let npower7 = > (fun () -> fun x -> (printf "power\n"; npower 7 (fun () -> x)) ()) ();; > > and notes that the result is different because the former calls printf > immediately whereas the latter defers. > > Surely the discrepancy is because the translation should be: > > let npower7 = > let e = printf "power\n"; npower 7 (fun () -> x) in > (fun () -> fun x -> e ()) ();; Hum "unbound value x" :) -- Nicolas Pouillard aka Ertai --=-1223383769-216283-27239-3251-3-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkjrWtkACgkQj+FCNw9dwLl5owCeM7fi49uZgftzPEs+P2tgWswS UvEAn2txW/1fqLHzlUrlWu8w0Hn1oSMB =DrKA -----END PGP SIGNATURE----- --=-1223383769-216283-27239-3251-3-=--