From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA05320 for caml-redistribution; Mon, 20 Dec 1999 17:17:19 +0100 (MET) 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 MAA32537 for ; Mon, 20 Dec 1999 12:06:42 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id MAA09136; Mon, 20 Dec 1999 12:06:37 +0100 (MET) Received: from localhost (riesling.inria.fr [128.93.8.51]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA05878; Mon, 20 Dec 1999 12:06:36 +0100 (MET) To: bpr@best.com Cc: caml-list@inria.fr Subject: Re: How do I .. Reply-To: Jacques.Garrigue@inria.fr In-Reply-To: Your message of "Sat, 18 Dec 1999 09:59:00 -0800 (PST)" References: X-Mailer: Mew version 1.93 on Emacs 20.4 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19991220120636F.garrigue@pauillac.inria.fr> Date: Mon, 20 Dec 1999 12:06:36 +0100 From: Jacques Garrigue X-Dispatcher: imput version 980905(IM100) Sender: weis From: Brian Rogoff > > I'm confused: > > > > Objective Caml version 2.99 (99/12/08) > > > > # let f (lx:x : int) = x + 1;; > > Syntax error > > Try "#modern true;;" at the top level, or compile with the -modern switch. > > I hope this modern/classic mode distinction is just a temporary thing. For this specific point of syntax, prohibiting it in classic mode is just temporary. This is intended to avoid bad behaviour on legacy programs, like "let f (x:int) = x + 1;;", where x: would interpreted as a label. Better to have a syntax error at once, rather than a "unbound value int" later on. Note that we cannot avoid all such cases, but this does not seem a good idea to have lots of them. As to the existence of two modes, I expect it to stay around for a bit longer. Clearly, there are supporters for both styles. Those who may like to put some labels in their interfaces, but do not want to have to put labels in every line of code, and those who value the extra expressive power of doing so. One solution would have been no classic mode, but two standard libaries, with or without labels. This might have worked ok, but this meant that the programming style was choosen by the author of the library, rather than by its user. With two modes, libraries can be written in any style, and they can be used (more or less) comfortably in both styles. Jacques ------------------------------------------------------ Jacques Garrigue, visiting INRIA from Kyoto University Jacques.Garrigue at inria.fr