From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q0MANdCL028792 for ; Sun, 22 Jan 2012 11:23:39 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au8CAIniG0/UGyoClGdsb2JhbABDq3iCKCIBAQEBCQsJCRQDIoFyAQEEAVMlBgsLIRYPCQMCAQIBRRMIAQGHeAK3M4kKgxwElRmFVox5 X-IronPort-AV: E=Sophos;i="4.71,551,1320620400"; d="scan'208";a="128399890" Received: from smtp2-g21.free.fr ([212.27.42.2]) by mail4-smtp-sop.national.inria.fr with ESMTP; 22 Jan 2012 11:23:33 +0100 Received: from [192.168.1.3] (unknown [82.237.71.191]) by smtp2-g21.free.fr (Postfix) with ESMTP id DE3A74B051B for ; Sun, 22 Jan 2012 11:23:26 +0100 (CET) Message-ID: <4F1BE3B1.3040704@inria.fr> Date: Sun, 22 Jan 2012 11:23:45 +0100 From: Xavier Leroy User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 MIME-Version: 1.0 To: caml-list@inria.fr References: <4F196092.7060707@dogguy.org> In-Reply-To: <4F196092.7060707@dogguy.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Custom let bindings On 01/20/2012 01:39 PM, Mehdi Dogguy wrote: > I noticed that Alain Frisch tried to add custom let bindings (see r11894 > and r11906) but it was reverted later on (see r11960) because no > consensus was reached (among OCaml Core team, I guess). Yes. We Caml developers spent a lot of time arguing about the merits and demerits of various syntaxes for monadic lets and other forms of generalized let bindings, discussing usability, generality, etc. There were some unexpected surprises, e.g. Lwt's concurrency monad needing a special monadic "let ... and ... in ..." binding, which makes sense for this particular monad but not for others. In the end, we decided that none of the proposals is something we can commit on and put (forever) in the core language. This is one of the cases that is currently best handled by Camlp4 syntax extensions, either specific to a monad (Lwt) or more general (pa_monad). Regards, - Xavier Leroy