From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id ACB57BC8B for ; Mon, 14 Feb 2005 03:10:50 +0100 (CET) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j1E2AmcO011393 for ; Mon, 14 Feb 2005 03:10:49 +0100 Received: from [192.168.1.200] (ppp212-197.lns2.syd3.internode.on.net [203.122.212.197]) by smtp3.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id j1E2AJI4008701; Mon, 14 Feb 2005 12:40:20 +1030 (CST) Subject: Re: [Caml-list] The boon of static type checking From: skaller Reply-To: skaller@users.sourceforge.net To: Thomas Fischbacher Cc: Michael Walter , Daniel Heck , caml-list@yquem.inria.fr In-Reply-To: References: <877e9a17050206221653d14456@mail.gmail.com> <877e9a17050212145737cc30d6@mail.gmail.com> <200502131451.02231.edgin@slingshot.co.nz> <20050213112630.73930e19@hobbes> <877e9a1705021312525337a907@mail.gmail.com> Content-Type: text/plain Organization: Message-Id: <1108347018.2584.197.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 14 Feb 2005 13:10:19 +1100 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 421008A8.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 sourceforge:01 wrote:01 wrote:01 o'caml:01 syntax:01 parser:01 syntax:01 trivial:01 grammar:01 ocaml:01 regexps:01 ocaml:01 misses:01 haskell:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Mon, 2005-02-14 at 08:42, Thomas Fischbacher wrote: > On Sun, 13 Feb 2005, Michael Walter wrote: > > > Your argument regarding Lisp and O'caml ignores the fact that > > programming languages are to a large part about syntax > > I feel I've mentioned that so many times it should be in some FAQ ;o) > With a parser generator (take zebu, for example) and, say, > SET-DISPATCH-MACRO-CHARACTER, I just as well can give you any syntax you > want on top of lisp. > So, syntax just as well is "nothing more than a library". However this indicates you're a Lisper. What you say isn't the case for most other languages. Lisp has a trivial grammar, as does, for example, Forth. Ocaml does indeed have a programmable front end with the camlp4 system, indeed pattern matches have been extended to include regexps with 'micmatch' package using it. However the idea that 'pattern matching' can just be done with a library for Ocaml is wrong AFAICS. Pattern matching is *fundamental* because, with the exception of a couple of library functions (hd, tl, fst, snd etc), it is the *only* way of accessing inductive data type destructors. Yes of course you can write a translator converting language A to language B, but the idea that this is always 'just syntax' misses the point -- there is a level of complexity in such a transformation where your translator isn't merely 'just a syntactic tranform' but earns the title 'compiler'. Would you call GHC: Haskell -> C 'just syntax'? Even Ocaml 'just produces assembler'.. Is not a term rewriting system, including the whole lambda calculus 'just a syntactic transformer'? -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net