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=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 4ADE8BC69 for ; Fri, 11 May 2007 16:36:25 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.230]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4BEaOZ7032628 for ; Fri, 11 May 2007 16:36:24 +0200 Received: by nz-out-0506.google.com with SMTP id l8so1067310nzf for ; Fri, 11 May 2007 07:36:24 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Ks8KkvG5zOJIuhpluhFyv3rqk4k6Jv4pobk7ttZnh3u2nAja41JRlvVmkSBRMI6VUyiZGNiP9LabZRI/z6fR5TfhRwGTQbKZHBz25gkWKLo8D9BY2Ya53eHw81f460rk6SSf7jQHP0WsF+MTChqTRFfz0e9jLZx0WVCBhLAxNfc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HqMGAuimYOXXwE98RveV6/GSRdexRotmKluGaZOivx3DGSh/+HhXX/TyB8LkAPfHyCCO4ZWrjp6tOvDS6jBFdStaxwuJyM/A0fCXYMliA9AxMTAr1HmJOGmu4744+Ft/eh0CVEGJiB9ZUJfU1GuSALrHkOQrbHj2ZHynkEr16Bk= Received: by 10.114.170.1 with SMTP id s1mr978472wae.1178894183925; Fri, 11 May 2007 07:36:23 -0700 (PDT) Received: by 10.114.183.4 with HTTP; Fri, 11 May 2007 07:36:23 -0700 (PDT) Message-ID: Date: Fri, 11 May 2007 16:36:23 +0200 From: "Nicolas Pouillard" To: "dmitry grebeniuk" Subject: Re: [Caml-list] Custom operators in the revised syntax Cc: "Nicolas Pouillard" In-Reply-To: <1884660607.20070511161455@moldavcable.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1884660607.20070511161455@moldavcable.com> X-j-chkmail-Score: MSGID : 46447F68.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46447F68.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; syntax:01 grebeniuk:01 syntax:01 infix:01 readable:01 camlp:01 patching:01 syntaxes:01 shalom:98 guideline:98 wrote:01 imho:01 precedence:01 caml-list:01 dmitry:01 On 5/11/07, dmitry grebeniuk wrote: > Shalom, Nicolas. > > NP> Today it's about custom operators. In the original syntax everyone > NP> knows that's easy to define and use custom operators like ++, -->, > >>>>, +|, =?=, ... and as many as you want. > > As for me, the lack of custom infix operators in revised syntax > is a feature that allows to keep code clean, without any > "=?=" or "<<+". The code "(func arg1 arg2)" is imho much > more readable than "arg1 op arg2" because: 1. function name > usually says something about the meaning of the function, 2. you > don't need to remember operator's precedence and associativity > to understand the code. This seems reasonable, but that's more a guideline. The feature can be present for that wants it. Moreover Camlp4 is about changing the syntax, so one can buy the revised syntax without the fact of patching syntaxes but features are here. -- Nicolas Pouillard