caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] CamlP4 Revised syntax comment
Date: Thu, 31 Oct 2002 10:21:30 +0100	[thread overview]
Message-ID: <20021031102130.D16979@verdot.inria.fr> (raw)
In-Reply-To: <54610CF4.15AD25CE.00958B05@netscape.net>; from artboreb@netscape.net on Wed, Oct 30, 2002 at 12:49:48PM -0500

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


  reply	other threads:[~2002-10-31  9:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-30 17:49 Arturo Borquez
2002-10-31  9:21 ` Daniel de Rauglaudre [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-10-25 19:02 brogoff
2002-10-25 19:25 ` Oleg
2002-10-26  9:27 ` Stefano Zacchiroli
2002-10-26 11:19   ` Daniel de Rauglaudre
2002-10-26 17:38   ` David Brown
2002-10-26 19:27     ` brogoff
2002-10-28  8:38   ` Kontra, Gergely
2002-10-28  9:28     ` Oleg
2002-10-28  9:41       ` Florian Douetteau
2002-10-28 10:04       ` Stefano Zacchiroli
2002-10-28 12:20     ` Daniel de Rauglaudre
2002-10-28 16:53       ` brogoff
2002-10-28 16:56     ` Alexander V.Voinov
2002-10-29 18:15       ` Gérard Huet
2002-10-29 18:47         ` Alexander V.Voinov
2002-10-29 20:53           ` Damien Doligez
2002-10-29 21:30             ` M E Leypold @ labnet
2002-10-29 21:42         ` brogoff
2002-10-29 11:30 ` Pierre Weis
2002-10-29 16:48   ` brogoff
2002-10-29 17:20     ` Alessandro Baretta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021031102130.D16979@verdot.inria.fr \
    --to=daniel.de_rauglaudre@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).