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=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 4E7A5BC69 for ; Fri, 19 Oct 2007 14:25:19 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAL4+GEfAXQImh2dsb2JhbACOVwIBCAop X-IronPort-AV: E=Sophos;i="4.21,300,1188770400"; d="asc'?scan'208";a="18345872" Received: from discorde.inria.fr ([192.93.2.38]) by mail4-smtp-sop.national.inria.fr with ESMTP; 19 Oct 2007 14:25:19 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l9JCPIwt001963 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 19 Oct 2007 14:25:18 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAABQ/GEfBMHhLiGdsb2JhbACOVwIBCAQGERg X-IronPort-AV: E=Sophos;i="4.21,300,1188770400"; d="asc'?scan'208";a="4847926" Received: from net.univ-savoie.fr ([193.48.120.75]) by mail3-smtp-sop.national.inria.fr with ESMTP; 19 Oct 2007 14:25:18 +0200 Received: from post.bourget.univ-savoie.fr (post.bourget.univ-savoie.fr [193.48.120.73]) by net.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id l9JCPFco030352 for ; Fri, 19 Oct 2007 14:25:15 +0200 Received: from [193.48.123.45] (d45.lama.univ-savoie.fr [193.48.123.45]) by post.bourget.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id l9JCP3h8002964 ; Fri, 19 Oct 2007 14:25:08 +0200 Message-ID: <4718A220.4030708@univ-savoie.fr> Date: Fri, 19 Oct 2007 14:25:04 +0200 From: Christophe Raffalli User-Agent: Thunderbird 1.5.0.13 (X11/20070824) MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] Re: Help me find this pdf References: <200710181457.58077.jon@ffconsultancy.com> <47176C28.1090509@janestcapital.com> <200710181818.31430.jon@ffconsultancy.com> <20071019152311.25cdf410.mle+ocaml@mega-nerd.com> In-Reply-To: <20071019152311.25cdf410.mle+ocaml@mega-nerd.com> X-Enigmail-Version: 0.94.2.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig881FEF466E044EB1A4A6AE48" X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) X-Miltered: at discorde with ID 4718A22E.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 haskell:01 haskell:01 ocaml:01 syntax:01 compilation:01 ocaml:01 trivial:01 semantics:01 cheers:01 chablais:01 X-Attachments: cset="UTF-8" type="application/pgp-signature" name="signature.asc" name="signature.asc" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig881FEF466E044EB1A4A6AE48 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Erik de Castro Lopo a =C3=A9crit : > B=C3=A1r=C3=B0ur =C3=81rantsson wrote: >=20 >> What you're saying is basically that lazy pattern matching should only= =20 >> force as much of the value under examination as is actually necessary = to=20 >> decide if there's a match. Do I have that right? >> >> If so, then Haskell does exactly this. >=20 > But haskell is lazy by default so of course it does it right. >=20 You mean that if I write (I use OCaml syntax) match p, q with | (true, true) -> | _ -> Haskell will first check if (p is evaluated and false) or (q is evaluated= and false) and then, if it is not the case will evaluate p, and finally if p is true= it will evaluate q ? This would mean that compilation of pattern matching in Haskell is a real= nightmare ... (this is already very painfull in OCaml) ... In fact, this also means that it is = not trivial to explain to the programmer the semantics of deep pattern-matching chosen by a give= n lazy language ... In Ocaml the programmer really needs to say what he/she wants and can imp= lement the above test by hand and it may be considered as a good thing ? > Erik Cheers, --=20 Christophe Raffalli Universite de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tel: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature. The public key is stored on www.keyserver.net --------------------------------------------- --------------enig881FEF466E044EB1A4A6AE48 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHGKIki9jr/RgYAS4RAiYAAJ4+6smRxvh9y/27ZAAoxr/iLlgEsQCffdtB sdl5c7WzZrEb4CjIzYRmu/k= =9zdK -----END PGP SIGNATURE----- --------------enig881FEF466E044EB1A4A6AE48--