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.2 required=5.0 tests=AWL,MISSING_HEADERS, 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 3944EBC0C for ; Tue, 16 Jan 2007 07:00:54 +0100 (CET) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.228]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0G60r2e031103 for ; Tue, 16 Jan 2007 07:00:53 +0100 Received: by wr-out-0506.google.com with SMTP id 69so1186879wra for ; Mon, 15 Jan 2007 22:00:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=cCFunWM2zspID8K4OB5WjJFD54fI7f1poxxpeTuAO5nIBktJoZ1MtzYMQPwtIOm7+1AU85Cpv8tG3cVNrrhodebKSAK7gGy3K5t+Ucknnf4GukdfKT8J/UeBB4ziliXL70hxNLiQV8IcHK/f8yjNttnvAlmvIHM2uU+nm5M1eyY= Received: by 10.65.38.13 with SMTP id q13mr7034756qbj.1168927250556; Mon, 15 Jan 2007 22:00:50 -0800 (PST) Received: from ?192.168.0.18? ( [69.155.31.57]) by mx.google.com with ESMTP id z21sm7139722qbc.2007.01.15.22.00.49; Mon, 15 Jan 2007 22:00:50 -0800 (PST) Message-ID: <45AC6A10.2010502@gmail.com> Date: Tue, 16 Jan 2007 00:00:48 -0600 From: Edgar Friendly User-Agent: Thunderbird 1.5.0.9 (X11/20061206) MIME-Version: 1.0 Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ocaml compiler features References: <45A87011.8080203@gmail.com> <20070115103556.GB12311@furbychan.cocan.org> <45AC60CB.4070408@gmail.com> <6ebe51ce0701152133m6e945d2emeec59219547b22d2@mail.gmail.com> In-Reply-To: <6ebe51ce0701152133m6e945d2emeec59219547b22d2@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-j-chkmail-Score: MSGID : 45AC6A15.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 45AC6A15.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 compiler:01 semi-colon:01 edgar:98 ketty:98 wrote:01 caml-list:01 imperative:01 cond:02 cond:02 pattern:04 expressions:04 expressions:04 paths:05 separated:05 ketty wrote: > you want this to work like it currently does: > if cond then bla; > bla_outside_if; > I haven't said anything about this pattern. Definitely if there's an else, it should allow a group of semi-colon separated expressions in between. ... At the moment, I think that this form of if should stay. > and this to work like you describe it: > if cond then bla; > bla_inside_if; > else > inside_else; > what_about_this; (* ? *) > This is the hard choice. Some sort of "end if" disambiguator would clean up this whole mess pretty easily, but would be a pain to include every time, especially when if is used like ?:. I don't know if this is reasonable, but what about having an if/then[/else] as now (no semis inside), but also having an if/then[/else]/end that allows semi-delimited expressions inside? This would be light-weight (and non-intrusive), but still allow imperative programmers their nice compound expressions inside if control paths. E.