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 NAA31621; Mon, 28 Oct 2002 13:20:55 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 NAA32038 for ; Mon, 28 Oct 2002 13:20:54 +0100 (MET) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9SCKs529636 for ; Mon, 28 Oct 2002 13:20:54 +0100 (MET) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id NAA29669 for caml-list@inria.fr; Mon, 28 Oct 2002 13:20:54 +0100 Date: Mon, 28 Oct 2002 13:20:54 +0100 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] CamlP4 Revised syntax comment Message-ID: <20021028132054.V21127@verdot.inria.fr> References: <20021026092737.GC15534@cs.unibo.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from kgergely@mlabdial.hit.bme.hu on Mon, Oct 28, 2002 at 09:38:04AM +0100 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Mon, Oct 28, 2002 at 09:38:04AM +0100, Kontra, Gergely wrote: > I really dislikes the do { } notation. > My suggestion is to use do end pairs, which is borrowed also from ruby. > And if we want more ruby-ish (ada-like?), the matching can be > match a with > | 0 -> > | n -> > end 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. 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"). -- Daniel de RAUGLAUDRE http://cristal.inria.fr/~ddr/ ------------------- 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