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 XAA19588; Fri, 17 May 2002 23:18:50 +0200 (MET DST) 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 XAA19579 for ; Fri, 17 May 2002 23:18:49 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g4HLIcf10467; Fri, 17 May 2002 23:18:38 +0200 (MET DST) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA19584; Fri, 17 May 2002 23:18:37 +0200 (MET DST) From: Pierre Weis Message-Id: <200205172118.XAA19584@pauillac.inria.fr> Subject: Re: [Caml-list] Camlp4/OCaml [was: Generating C stubs] In-Reply-To: <20020517153120.GB27012@kiefer.ai.univie.ac.at> from Markus Mottl at "May 17, 102 05:31:20 pm" To: markus@oefai.at (Markus Mottl) Date: Fri, 17 May 2002 23:18:37 +0200 (MET DST) Cc: pierre.weis@inria.fr, alex@baretta.com, caml-list@inria.fr X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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