From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 02E2DBB81 for ; Wed, 22 Mar 2006 09:19:05 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k2M8J4LZ022318 for ; Wed, 22 Mar 2006 09:19:04 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA12449 for ; Wed, 22 Mar 2006 09:19:03 +0100 (MET) Received: from rabbit.math.nagoya-u.ac.jp (rabbit.math.nagoya-u.ac.jp [133.6.130.5]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k2M8J1b0022305 for ; Wed, 22 Mar 2006 09:19:02 +0100 Received: from localhost (millas [172.16.30.29]) by rabbit.math.nagoya-u.ac.jp (8.12.11/3.7W) with ESMTP id k2M8Ij19005955; Wed, 22 Mar 2006 17:18:45 +0900 (JST) Date: Wed, 22 Mar 2006 17:20:12 +0900 (JST) Message-Id: <20060322.172012.78710769.garrigue@math.nagoya-u.ac.jp> To: jhw@conjury.org Cc: caml-list@inria.fr Subject: Re: [Caml-list] syntax annoyance From: Jacques Garrigue In-Reply-To: References: X-Mailer: Mew version 4.0.69 on Emacs 22.0.50 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 44210878.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44210875.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; syntax:01 woodyatt:01 jhw:01 syntax:01 elided:01 caml-list:01 parentheses:01 parentheses:01 int:01 int:01 jacques:01 jacques:01 readable:01 constructs:02 garrigue:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 From: j h woodyatt > > # Some object method x = 0 method y = 1 end;; > > Syntax error > > # Some (object method x = 0 method y = 1 end);; > > - : < x : int; y : int > option = Some > > It seems to me that the parentheses are sorta redundant, and it would > be nice if they could be elided. It's weird that the "r option" case > works without additional parentheses and the " option" requires > them. Look at the above two lines, and tell me which one is more readable :-) I hesitated a while before deciding the priority, particularly considering that the similar looking "begin ... end" doesn't need parentheses. But I concluded that you don't want _too_ many parentheses-like constructs in the language. Jacques Garrigue