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 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id E6BB0BCD0; Sun, 21 Oct 2007 12:12:36 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAALKsGUfAXQInh2dsb2JhbACOVQEBAQgKKQ X-IronPort-AV: E=Sophos;i="4.21,303,1188770400"; d="asc'?vcf'?scan'208";a="3388560" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 20 Oct 2007 16:27:13 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l9KERDda008489 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK); Sat, 20 Oct 2007 16:27:13 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAABOtGUfUGyocimdsb2JhbACOVQEBAQgEBhERBw X-IronPort-AV: E=Sophos;i="4.21,303,1188770400"; d="asc'?vcf'?scan'208";a="3387572" Received: from smtp2-g19.free.fr ([212.27.42.28]) by mail1-smtp-roc.national.inria.fr with ESMTP; 20 Oct 2007 16:27:13 +0200 Received: from smtp2-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp2-g19.free.fr (Postfix) with ESMTP id A474312B6F8; Sat, 20 Oct 2007 16:27:12 +0200 (CEST) Received: from Tocksi.local (unknown [82.251.146.98]) by smtp2-g19.free.fr (Postfix) with ESMTP id 6719512B6EC; Sat, 20 Oct 2007 16:27:12 +0200 (CEST) Message-ID: <471A100D.7080003@univ-savoie.fr> Date: Sat, 20 Oct 2007 16:26:21 +0200 From: Christophe Raffalli User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Luc Maranget Cc: 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> <4718A220.4030708@univ-savoie.fr> <20071019124706.GA30305@yquem.inria.fr> In-Reply-To: <20071019124706.GA30305@yquem.inria.fr> X-Enigmail-Version: 0.95.3 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig176049E163EEAEFB5D31BFBA" X-Miltered: at concorde with ID 471A1041.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 maranget:01 ocaml:01 syntax:01 haskell:01 haskell:01 semantics:01 compilation:01 reasonnable:01 ocaml:01 chablais:01 X-Attachments: cset="utf-8" name="Christophe.Raffalli.vcf" name="Christophe.Raffalli.vcf" type="application/pgp-signature" name="signature.asc" name="signature.asc" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig176049E163EEAEFB5D31BFBA Content-Type: multipart/mixed; boundary="------------040500050608030104050409" This is a multi-part message in MIME format. --------------040500050608030104050409 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Luc Maranget a =E9crit : >> You mean that if I write (I use OCaml syntax) >> >> match p, q with >> | (true, true) -> A >> | _ -> B >> >> Haskell will first check if (p is evaluated and false) or (q is evalua= ted and false) >> and then, if it is not the case will evaluate p, and finally if p is t= rue it will evaluate q ? >> >> =20 > > Haskell has left-to-right semantics for PM. Basically this is expressed= > by PM compilation. > =20 And this is not optimal (I was answering the sentence "Haskell does it right"). In fact, there is no optimal way of doing pattern matching in lazy languages (with deep pattern) because the language can not decide what is best to evaluate. Certainly left to right is a reasonnable choice, but letting the programmer choose (or even forcing him to choose has in OCaml) is a good choice (I think better). --=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=20 can check this signature. The public key is stored on www.keyserver.net --------------------------------------------- --------------040500050608030104050409 Content-Type: text/x-vcard; charset=utf-8; name="Christophe.Raffalli.vcf" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Christophe.Raffalli.vcf" begin:vcard fn:Christophe Raffalli n:Raffalli;Christophe org:LAMA (UMR 5127) email;internet:christophe.raffalli@univ-savoie.fr title;quoted-printable:Ma=3DC3=3DAEtre de conf=3DC3=3DA9rences tel;work:+33 4 79 75 81 03 note:http://www.lama.univ-savoie.fr/~raffalli x-mozilla-html:TRUE version:2.1 end:vcard --------------040500050608030104050409-- --------------enig176049E163EEAEFB5D31BFBA 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.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHGhAni9jr/RgYAS4RAjn3AJ9XNOSfH62Vi4wNLTbAFc6uica2RACeLwdJ qtfMGdAsyBKytCL9nW2h/sI= =RIKy -----END PGP SIGNATURE----- --------------enig176049E163EEAEFB5D31BFBA--