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=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 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 77930BC0B for ; Mon, 15 Jan 2007 11:36:14 +0100 (CET) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0FAaBDN021644 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 15 Jan 2007 11:36:14 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1H6PC7-0003r1-00; Mon, 15 Jan 2007 10:36:03 +0000 Date: Mon, 15 Jan 2007 10:36:02 +0000 To: Edgar Friendly Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Ocaml compiler features Message-ID: <20070115103556.GB12311@furbychan.cocan.org> References: <45A87011.8080203@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45A87011.8080203@gmail.com> User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at concorde with ID 45AB591B.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 compiler:01 hmmm:01 edgar:98 pet:98 wrote:01 precedence:01 caml-list:01 exceptions:01 parentheses:01 unsafe:01 int:01 int:01 string:02 string:02 On Fri, Jan 12, 2007 at 11:37:21PM -0600, Edgar Friendly wrote: > if y=1 then > let z = 2 in > print_int y; > print_int z; > else > print_string "not one" Hmmm .. changing the precedence of operators to avoid two parentheses ... I don't think that's good. if y=1 then ( let z = 2 in print_int y; print_int z; ) else print_string "not one" I will however add my own pet wish: a 'return' statement! It doesn't have to break type safety -- you should only be allowed to 'return' a type compatible with the ordinary return type of the function. The alternative (using exceptions to jump out of code) is ugly, slow and unsafe. Rich. -- Richard Jones Red Hat UK Limited