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 31AC3BC88 for ; Thu, 3 Feb 2005 23:42:42 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j13Mgf4R014693 for ; Thu, 3 Feb 2005 23:42:41 +0100 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 XAA26955 for ; Thu, 3 Feb 2005 23:42:41 +0100 (MET) Received: from biggles.scientician.net (0x50a5bb8d.odnxx9.adsl-dhcp.tele.dk [80.165.187.141]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j13MgeOr014686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 3 Feb 2005 23:42:40 +0100 Received: from bardur by biggles.scientician.net with local (Exim 4.43) id 1CwpgN-0002UD-Dd; Thu, 03 Feb 2005 23:42:39 +0100 Date: Thu, 3 Feb 2005 23:42:39 +0100 From: Bardur Arantsson To: caml-list@inria.fr Subject: Re: [Caml-list] Estimating the size of the ocaml community Message-ID: <20050203224239.GB8482@scientician.net> Mail-Followup-To: caml-list@inria.fr References: <891bd33905020213315a2ebb18@mail.gmail.com> <8008871f05020213362d21ba87@mail.gmail.com> <000f01c50971$baad4840$0100a8c0@mshome.net> <1107403128.32586.223.camel@pelican.wigram> <20050203173556.4acec1c5.ocaml-erikd@mega-nerd.com> <009a01c50a1e$f6c92080$0100a8c0@mshome.net> <87d3baf87b21ac5a17a8d8782ac21cfa@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87d3baf87b21ac5a17a8d8782ac21cfa@mac.com> User-Agent: Mutt/1.5.6i X-Miltered: at concorde with ID 4202A8E1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4202A8E0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 wrote:01 hash:01 wrote:01 syntax:01 imho:01 scheme's:01 syntax:01 expander:01 o'caml's:01 ast:01 graydon:01 compiler:01 parser:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: On Thu, Feb 03, 2005 at 01:58:33PM -0800, Paul Snively wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > On Feb 3, 2005, at 1:16 PM, Thomas Fischbacher wrote: > >(1) I by far do not have the flexibility in extending the language with > >own syntax which I have in Lisp. > I have to respectfully disagree with this: IMHO, entirely too much is > made of Lisp's macros (as distinct from Scheme's hygenic macros)! With > camlp4, I have the ability to go from any concrete syntax I have an > expander for to O'Caml's AST and back. This is used to good effect in > Graydon Hoare's One Day Compiler presentation. Camlp4 has its own problems which I discovered when writing a parser generator: - When using quotations to construct the AST there is often only one (and usually quite counterintuitive) way to construct a particular AST fragment. The error messages are incredibly obtuse and when the line numbers don't work properly this can be a royal PITA to get right. - There is AFACT no way to "generate" identifiers in generated code so that they are guaranteed not to clash with identifiers in outer/inner scopes. - You cannot verify that the generated AST will actually be valid OCaml (e.g. free of references to unbound variables) until the generated AST is compiled. It's not a huge problem, but it means you have to test more for syntactical(!) corner cases. Personally, I'm hoping that MetaOCaml (or something similar) will make it into standard OCaml... but I'm not holding my breath. Of course that "only" solves the problem of how to generate code in a sane manner. It doesn't really provide for an easier way to extend the syntax as such. > >(7) I cannot easily (format t "DEBUG: compsite-thingy-bla-now-is ~A~%" > >bla). > I don't quite follow; is there something wrong with Printf? It can only print simple values, not compound values such as records, objects, etc... Well, alright, it can use a custom printer, but there shouldn't really be any need to have to write custom printers for e.g. records when it's patently obvious how they should be printed (in the absence of a more specific format). -- Bardur Arantsson - That which does not kill you only makes you stranger. MisterQueue | http://kuro5hin.org