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 KAA26893; Thu, 31 Oct 2002 10:21:31 +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 KAA25658 for ; Thu, 31 Oct 2002 10:21:30 +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 g9V9LU522993 for ; Thu, 31 Oct 2002 10:21:30 +0100 (MET) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id KAA17235 for caml-list@inria.fr; Thu, 31 Oct 2002 10:21:30 +0100 Date: Thu, 31 Oct 2002 10:21:30 +0100 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] CamlP4 Revised syntax comment Message-ID: <20021031102130.D16979@verdot.inria.fr> References: <54610CF4.15AD25CE.00958B05@netscape.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <54610CF4.15AD25CE.00958B05@netscape.net>; from artboreb@netscape.net on Wed, Oct 30, 2002 at 12:49:48PM -0500 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Wed, Oct 30, 2002 at 12:49:48PM -0500, Arturo Borquez wrote: > > 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). It is exactly my position: more verbosity is a drawback, but the fact that there is sometimes necessary in normal syntax to enclose statements with parentheses is a bad property. An example of that is the pretty print. The pretty print in normal syntax is a difficulty, because of these pending "else" and pending "vertical bar": we have sometimes to enclose "if" and "match" statements with parentheses, sometimes not. A solution could be to always print with parentheses, but the result is ugly. I found another solution by calling the pretty printing functions with an extra parameter telling "what is printed after", and when I print a "match" statement, if that parameter is "|", it means that this match must be enclosed with parentheses "(..)" or "begin..end". -- 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