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 q0MAhSHF029247 for ; Sun, 22 Jan 2012 11:43:28 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhYEADXnG0/RVde2kGdsb2JhbABDFoRzmEiPbFsIIgEBAQEHCw0HFAQhgXIBAQEEEgIPFQgBGxwBAQMMBgULDQICBRYLAgIJAwIBAgEREQEFARwTAQcBAR6HYpsQCosiSIJvhAo/iHECBQuBJIlhgRYElRmHDocEPYQA X-IronPort-AV: E=Sophos;i="4.71,551,1320620400"; d="scan'208";a="128401236" Received: from mail-ey0-f182.google.com ([209.85.215.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 22 Jan 2012 11:43:24 +0100 Received: by eaai10 with SMTP id i10so869673eaa.27 for ; Sun, 22 Jan 2012 02:43:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=I+fssSnqCQDx9cuzduARFzweh5RANKFqHRIZVtuBSNk=; b=OkK8QWk/O63a5+AfOeuGxh99ToP1GiC3ztGDT2tXHgqQ0RT2oTtDS6CuiGqtoO1AbR A/NgYRq3UwrtRgKNjy0iAVEqbyXvFQYHNx9V6XoPo4GbzL5nKaLzVVR7Fpmx35OXLdZm 6vqbh7vClgEDACyPj+LQybxbq7EI4bM/vJZxc= Received: by 10.213.26.11 with SMTP id b11mr874521ebc.40.1327229003699; Sun, 22 Jan 2012 02:43:23 -0800 (PST) Received: from ?IPv6:2a01:e35:2f37:f210:5e26:aff:fe0c:c1d8? ([2a01:e35:2f37:f210:5e26:aff:fe0c:c1d8]) by mx.google.com with ESMTPS id s16sm38109687eef.2.2012.01.22.02.43.21 (version=SSLv3 cipher=OTHER); Sun, 22 Jan 2012 02:43:22 -0800 (PST) Message-ID: <4F1BE848.5050200@gmail.com> Date: Sun, 22 Jan 2012 11:43:20 +0100 From: Jonathan Protzenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0a1) Gecko/20120115 Thunderbird/12.0a1 MIME-Version: 1.0 CC: caml-list@inria.fr References: <4F196092.7060707@dogguy.org> <4F1BE3B1.3040704@inria.fr> In-Reply-To: <4F1BE3B1.3040704@inria.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Custom let bindings Hi folks, I've put a raw, not pretty dump of the discussion at . We didn't reach any consensus there, and we've covered the subject extensively. I'm just publishing it if anyone's interested. Please refrain from adding any extra messages to this thread, unless you have arguments that make one proposal *clearly, objectively better than the others*. There's been enough back-and-forth already, so any arguments such as "/me likes" or "just pick any one of them" will be happily dismissed. Thanks, jonathan On Sun 22 Jan 2012 11:23:45 AM CET, Xavier Leroy wrote: > 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 >