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 SAA09851; Wed, 30 Oct 2002 18:49:54 +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 SAA10146 for ; Wed, 30 Oct 2002 18:49:53 +0100 (MET) Received: from imo-m03.mx.aol.com (imo-m03.mx.aol.com [64.12.136.6]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9UHnp526949; Wed, 30 Oct 2002 18:49:52 +0100 (MET) Received: from artboreb@netscape.net by imo-m03.mx.aol.com (mail_out_v34.13.) id g.f0.5e8a760 (16216); Wed, 30 Oct 2002 12:49:48 -0500 (EST) Received: from netscape.net (mow-m05.webmail.aol.com [64.12.184.133]) by air-in01.mx.aol.com (v89.16) with ESMTP id MAILININ14-1030124948; Wed, 30 Oct 2002 12:49:48 -0400 Date: Wed, 30 Oct 2002 12:49:48 -0500 From: artboreb@netscape.net (Arturo Borquez) To: daniel.de_rauglaudre@inria.fr (Daniel de Rauglaudre) Cc: caml-list@inria.fr Subject: Re: [Caml-list] CamlP4 Revised syntax comment MIME-Version: 1.0 Message-ID: <54610CF4.15AD25CE.00958B05@netscape.net> X-Mailer: Atlas Mailer 2.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Daniel de Rauglaudre wrote: >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 I like and seems me a good compromise actual revised syntax, also do { ... } is a good (and visible warning) that may be side effects to care. No way to if ... else ... end as you said it isn't FP (it is pure impertative style). I prefer the revised syntax despite extra verbosity because it overcomes some confusing situations of the official syntax. (if with or without else, { and begin, } and end, the match function ... among others). Best regards. -- Arturo Borquez __________________________________________________________________ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ ------------------- 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