From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA08303; Mon, 28 Oct 2002 17:53:16 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA08331 for ; Mon, 28 Oct 2002 17:53:15 +0100 (MET) Received: from grace.speakeasy.org (grace.speakeasy.org [216.254.0.2]) by nez-perce.inria.fr (8.11.1/8.11.1) with SMTP id g9SGrED12108 for ; Mon, 28 Oct 2002 17:53:14 +0100 (MET) Received: (qmail 19933 invoked by uid 36130); 28 Oct 2002 16:53:12 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 28 Oct 2002 16:53:12 -0000 Date: Mon, 28 Oct 2002 08:53:12 -0800 (PST) From: brogoff@speakeasy.net To: "caml-list@inria.fr" Subject: Re: [Caml-list] CamlP4 Revised syntax comment In-Reply-To: <20021028132054.V21127@verdot.inria.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, 28 Oct 2002, Daniel de Rauglaudre wrote: > I like the way Ada ends its statements. However, as said in the > chapter about the revised syntax (tutorial), we took the option not to > end the statements with a keywork ("end", or "fi" or things like > that), in order to show that all of that is functionnal. I mostly like Ada syntax too. It could use a few more characters, like [] for arrays and Pascalish ^ for access types; blame the Steelman requirements doc, not Jean Ichbiah, for this! As you point out though, Ada is far from functional so I don't agree that it should be a model for an MLish syntax. > When you see: > if e1 then e2 else e3 end > > you don't have the impression that e2 or e3 are *results*: the "end" > gives you the impression that everything is terminated. Often, newbies > don't understand the functional way this statement must be read. If we > change the syntax with this "end", it is going to be more difficult to > explain then. > > This way, I regret a little bit the "do { }" of the "for" loop. A > "do .. done" would have been more logical (same for "while"). I like having the sequencing syntax being the same with or without the loop, but I certainly understand that there is a valid argument for seeing them differently, since in a non-looping sequence you typically return the value of the last expression. I thought that do { } was a compromise, since some users just wanted {} or () to be the non-optional bracketing for sequences. I remember some of that discussion, and I certainly wouldn't mind that solution, or the creation of special non-alphabetic brackets for imperative constructs. I'm not fond of do .. done myself. -- Brian ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners