[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Daniel de Rauglaudre <daniel.de_rauglaudre@i...> |
| Subject: | Re: [Caml-list] CamlP4 Revised syntax comment |
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