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 TAA15049; Thu, 22 May 2003 19:16:42 +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 TAA15061 for ; Thu, 22 May 2003 19:16:40 +0200 (MET DST) Received: from kraid.nerim.net (smtp-104-thursday.nerim.net [62.4.16.104]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h4MHGdH18416 for ; Thu, 22 May 2003 19:16:39 +0200 (MET DST) Received: from hector.lesours (lesours.starynkevitch.net [80.65.224.217]) by kraid.nerim.net (Postfix) with ESMTP id 2E6C840EC7; Thu, 22 May 2003 19:16:38 +0200 (CEST) Received: from basile by hector.lesours with local (Exim 3.36 #1 (Debian)) id 19ItgE-00065C-00; Thu, 22 May 2003 19:16:38 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <16077.1526.521835.393248@hector.lesours> Date: Thu, 22 May 2003 19:16:38 +0200 To: Ed L Cashin Cc: caml-list@inria.fr Subject: Re: [Caml-list] my first questions about camlp4 In-Reply-To: <87y90zvunc.fsf@cs.uga.edu> References: <20030522025118.37681.qmail@mail.com> <87y90zvunc.fsf@cs.uga.edu> X-Mailer: VM 7.15 under Emacs 21.3.2 From: Basile STARYNKEVITCH X-Spam: no; 0.00; basile:01 caml-list:01 camlp:01 lacks:01 persistency:01 faiencerie:01 92340:01 reine:01 nerim:01 tunes:01 ocaml:01 lisp:01 writes:01 syntax:02 purely:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >>>>> "Ed" == Ed L Cashin writes: Ed> "Dont Bother" writes: >> 1. It's been said that Camlp4 is not as easy to use as Lisp >> macros, but is it as powerful? Is there anything that can be >> done with Lisp macros that can not be done using Camlp4 in the >> context of their respective languages? Ed> You might get a better answer to that question on Ed> comp.lang.lisp. [...] I do know a tiny bit CL, and I do practice Ocaml with Camlp4. It seems to me that CommonLisp macros can -for example- interact with CL object system, while Camlp4 is purely syntactic (in that sense, it is more like Scheme macros). For example, I tend to believe that you can make a commonlisp macro which, given a class name C, extract all the fields F of this class C such that F name ends with a suffix S and generate a printing routine which prints only those fields. I think that this is not possible in Camlp4 (unless you redefine in Camlp4 the syntax defining Ocaml classes). In a more general way, I do think that Ocaml still lacks some reflective abilities (which could help for other things, e.g. persistency). Also, macros are an essential part of CommonLisp; for example, they are repeatedly used for CommonLisp advocacy, while Camlp4 is not yet used systematically by Ocaml believers. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet aliases: basiletunesorg = bstarynknerimnet 8, rue de la Faïencerie, 92340 Bourg La Reine, France ------------------- 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