From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 1378EBC8B for ; Mon, 14 Feb 2005 00:59:34 +0100 (CET) Received: from mail.physik.uni-muenchen.de (mail.physik.uni-muenchen.de [192.54.42.129]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1DNxXkU011478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 14 Feb 2005 00:59:33 +0100 Received: from localhost (unknown [127.0.0.1]) by mail.physik.uni-muenchen.de (Postfix) with ESMTP id 51E1320004; Mon, 14 Feb 2005 00:59:33 +0100 (CET) Received: from mail.physik.uni-muenchen.de ([127.0.0.1]) by localhost (mail.physik.uni-muenchen.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19100-02-64; Mon, 14 Feb 2005 00:59:31 +0100 (CET) Received: from mailhost.cip.physik.uni-muenchen.de (kaiser.cip.physik.uni-muenchen.de [141.84.136.1]) by mail.physik.uni-muenchen.de (Postfix) with ESMTP id 133D320018; Mon, 14 Feb 2005 00:59:31 +0100 (CET) Received: from eiger.cip.physik.uni-muenchen.de (eiger.cip.physik.uni-muenchen.de [141.84.136.54]) by mailhost.cip.physik.uni-muenchen.de (Postfix) with ESMTP id ACDAD26E89; Mon, 14 Feb 2005 00:59:30 +0100 (CET) Received: by eiger.cip.physik.uni-muenchen.de (Postfix, from userid 3092) id 0DA4D3CBB; Mon, 14 Feb 2005 00:59:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by eiger.cip.physik.uni-muenchen.de (Postfix) with ESMTP id 0B5D42D714; Mon, 14 Feb 2005 00:59:21 +0100 (CET) Date: Mon, 14 Feb 2005 00:59:21 +0100 (CET) From: Thomas Fischbacher To: Michael Walter Cc: Daniel Heck , caml-list@yquem.inria.fr Subject: Re: [Caml-list] The boon of static type checking In-Reply-To: <877e9a1705021314512ff095b9@mail.gmail.com> Message-ID: References: <877e9a17050206221653d14456@mail.gmail.com> <877e9a17050212145737cc30d6@mail.gmail.com> <200502131451.02231.edgin@slingshot.co.nz> <20050213112630.73930e19@hobbes> <877e9a1705021312525337a907@mail.gmail.com> <877e9a1705021314512ff095b9@mail.gmail.com> X-BOFH: Daemons did it MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: amavisd-new at physik.uni-muenchen.de X-Miltered: at nez-perce with ID 420FE9E5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 wrote:01 parser:01 syntax:01 syntax:01 run-time:01 perl's:01 ocaml:01 compiler:01 abstraction:01 unify:01 haskell:01 sml:01 attitude:98 agglomerate:98 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 Sun, 13 Feb 2005, Michael Walter wrote: > > > 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. But I think you understand if I don't post code > > that explicitly demonstrates how to do that now. > > This has obvious restrictrions in Common Lisp (you even mentioned one > of them in UPPERCASE-LETTERS :). You can just as well put another REPL at the top. MAXIMA is an example of just one system that does precisely that. > The fact that few people actually > extend the syntax of CL beyond mere S-expressions also indicates that > (the usual counter goes like "we are happy with S-expressions", which > I believe is not the entire story :). [1] Well, the point is that many people may initially think that the system should have a "proper" syntax (including McCarthy, by the way), but upon working with it for some time discover that actually it's much more convenient if it does not. I must say, I did it, transliterating much of (it's not a lot of work to be done, yet not quite complete) C's syntax to lisp, with the intention to provide people with their own syntax which they even can extend, say, for new operators, should they feel like it. I know I probably will never use it. Neither will _any_ advanced lisp hacker, I suppose. But it should help some people if you build them a bridge. > I can imagine, though, that there might eventually be a language (or > environment), which gets rid of some of those restrictions, which is > one of the reasons why I've a.. more open attitude to new programming > languages and environments :) [2,3] My point is: one should not agglomerate things prematurely that better first should be studied in isolation. In particular, it certainly is important to understand what syntactic conventions help human programmers to express their thoughts. It is also of undeniable importance to understand run-time system issues such as what data types and functionality a language should offer. For example, I by now consider perl's concept of "plurality" (@x behaving like "those thingies" and \@x behaving like "this array") as far not as useful than it was intended to be. Just as one can learn more about the structure of the proton by probing it with electrons rather than with another proton, I would not mind a more systematic approach towards finding out what makes a good language and what not than throwing together a set of features from various corners, shaking it well, and seeing how pretty the thing one gets turns out to be. Geologists do (mineral-forming) experiments of just that kind as well. They call it "cook and look". So, again, syntax is not by itself an essential feature of the language. What then does make ocaml so attractive that one should consider it as a basis for a project? * It's far easier to learn and handle than most other languages for casual users. (Like, say, people who are not programmers, but do a bit of programming nevertheless.) * It's got a quite reasonable free compiler that can produce somewhat compact standalone binaries, and is available for a variety of platforms. * There is support for lambda abstraction. I don't think there are many systems that unify these properties. At least, it's not true for lisp, haskell, perl, python, c, c++, java, sml/nj, ... -- regards, tf@cip.physik.uni-muenchen.de (o_ Thomas Fischbacher - http://www.cip.physik.uni-muenchen.de/~tf //\ (lambda (n) ((lambda (p q r) (p p q r)) (lambda (g x y) V_/_ (if (= x 0) y (g g (- x 1) (* x y)))) n 1)) (Debian GNU)