Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Generating C stubs
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Pierre Weis <pierre.weis@i...>
Subject: Re: [Caml-list] Camlp4/OCaml [was: Generating C stubs]
> On Fri, 17 May 2002, Pierre Weis wrote:
> > Section IV: When to use parentheses within an expression
> 
> I know that I should write OCaml-programs rather than participate in
> yet another heating debate on syntax, but I just cannot resist...

Dear Markus,

You know that I'm not on the side of those that consider syntax as a
minor concern and a waste of time: to you I can say the truth because
I know you will understand it, but please do not tell it to others! In
my mind there is no clear distinction between syntax and semantics. We
very often use syntactic models of theories, hence acknowledging the
fact that difference between syntax and semantics is tenious, subtle,
and more or less a question of point of view (consider for instance
Lisp S-expressions first as abstract syntax trees (syntactic view),
and then as programs and values (semantics view)).

Hence, (to me) there is no question about the fact that semantics
(hence syntax) is of primordial importance. So that we have to improve
the syntax of the language if we can. But we cannot say that the
regular syntax is EXTREMELY ambiguous (with upper case letters and the
like). Be quite, please! It is not ambiguous. You need some parens
sometimes as in math, and math is not known to be that ambiguous.

And we have rules, once again as in math (and generally speaking we
have the same rules, even if we use them in a generalised
manner). This is a good property. The drawback is that you must learn
them; once again as in math.

Considering the difficulties of apprentices, some pedagogical theories
of mathematics once proposed to adopt completely unambiguous (read
absolutely redundant if you want) notations or encodings for algebraic
expressions in mathematics (reverse polish or lisp like parentheses
for operators). This was a complete failure. It happens to be not only
less readable than the usual notation but even much more difficult to
teach, use, and learn!

So, as you know, we have to be careful about those syntax changes: the
best could be worse that the good (as we say in french).

In any way, claiming the Caml syntax is this or that is just useless
and a waste of time. More interesting is to state problems that have
to be solved and axioms (or rules) you want to respect. That's what is
interesting in the revised syntax. Believe it or not, I am glad to see
that it elegantly realizes some of those rules I definitely would like
to have in the syntax of the language; on the other hand it
consistantly violate other of my personal axioms about the syntaxes I
like. It is truly difficult to design a good syntax!

So, what I am interested in is to set up a list of rules to guide the
design of a syntax. This is hard, but interesting and could lead to a
syntax easy to learn and use. This would be constructive and new.

Best regards,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/


-------------------
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