From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id AAFF37ED1A for ; Fri, 18 May 2012 17:25:01 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuMCANVotk+MTaZEgWdsb2JhbABFDrNfIgEBFiYnghUBAQUnUQEQCxgJEwMPCQMCAQIBKxoGDQEHAQGICrxXkEUDjjiBHZdwOw X-IronPort-AV: E=Sophos;i="4.75,617,1330902000"; d="asc'?scan'208";a="158905123" Received: from toccata.ens-lyon.org ([140.77.166.68]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 18 May 2012 17:25:01 +0200 Received: from localhost (localhost [127.0.0.1]) by toccata.ens-lyon.org (Postfix) with ESMTP id 05CDE840B2; Fri, 18 May 2012 17:25:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at toccata.ens-lyon.org Received: from toccata.ens-lyon.org ([127.0.0.1]) by localhost (toccata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hh0yyYOXe2kh; Fri, 18 May 2012 17:25:00 +0200 (CEST) Received: from Niels.local (mozilla.vlan402.asr1.cdg3.gblx.net [208.49.33.218]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by toccata.ens-lyon.org (Postfix) with ESMTPSA id 60F8B840AF; Fri, 18 May 2012 17:25:00 +0200 (CEST) Message-ID: <4FB669B4.6000200@ens-lyon.org> Date: Fri, 18 May 2012 17:24:36 +0200 From: David Rajchenbach-Teller Reply-To: David.Teller@ens-lyon.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Yitzhak Mandelbaum CC: OCaml mailing list References: <87d36bnafe.fsf@frosties.localnet> In-Reply-To: X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig944C6F2D511D754126BDF86B" Subject: Re: [Caml-list] optional functions in modules This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig944C6F2D511D754126BDF86B Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 5/17/12 7:43 PM, Yitzhak Mandelbaum wrote: > Thanks to everyone who responded. FWIW, I found the argument in favor of= options most compelling as a general approach. >=20 > Yitzhak >=20 Note that there is a drawback to that approach: loss of polymorphism. # let mmap =3D Some List.map;; val mmap : (('a -> 'b) -> 'a list -> 'b list) option =3D Some # let mmap2 =3D match mmap with | None -> failwith "Nope" | Some x -> x;; val mmap2 : ('_a -> '_b) -> '_a list -> '_b list =3D I suspect that first-class modules can help here, but I have not really had time to toy with them yet. Cheers, David --------------enig944C6F2D511D754126BDF86B 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.11 (Darwin) iQEcBAEBAgAGBQJPtmm7AAoJED+FkPgNe9W+VX8H/RRCntNhjN9bTB+jS1cng0OF Oo7SNAWPdl6Hb8QM8ZmMl098tb30wzXmHyAV+Syla7Lm4hHruiOQ9wW9jOFCBIDc YPAQ2jkaWibH2JuTbQxbSGPoY8c6f2xj+CKcO2TOL9UdKLInYbGmU8izuIR3mxCN l09UdAoAySLUrElIbIDuWUp/GX5s2+6nEf4CRUWYVAtcIw4DFaK1QuFzxWokdbAx kT3AK0coLqVXWQtPLCIs/bTG7huo0fOASjykIQo0heSGXb4i3dKHtzxPzuo3JVt5 UwcLWw/AayEUTmG/xD13E1pCIYWRNFys1twZuQrhfeCGyG+qieNaVxOvTmjBcx8= =atRO -----END PGP SIGNATURE----- --------------enig944C6F2D511D754126BDF86B--