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 CAA05925; Wed, 11 Jun 2003 02:58:01 +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 CAA05116 for ; Wed, 11 Jun 2003 02:58:00 +0200 (MET DST) Received: from jalapeno.cc.columbia.edu (jalapeno.cc.columbia.edu [128.59.59.238]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h5B0vxH20792 for ; Wed, 11 Jun 2003 02:57:59 +0200 (MET DST) Received: from tw304h3.cpmc.columbia.edu (tw304h3.cpmc.columbia.edu [156.111.84.180]) (user=ot14 mech=LOGIN bits=0) by jalapeno.cc.columbia.edu (8.12.8p1/8.12.8) with ESMTP id h5B0vvDH006904 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NOT); Tue, 10 Jun 2003 20:57:58 -0400 (EDT) From: Oleg Trott To: Pierre CHATEL , caml-list@inria.fr Subject: Re: [Caml-list] Camlp4, macros an thoughts Date: Tue, 10 Jun 2003 20:57:54 -0400 User-Agent: KMail/1.5.1 References: <7AD4D407-9A60-11D7-8095-0003930EC608@wanadoo.fr> In-Reply-To: <7AD4D407-9A60-11D7-8095-0003930EC608@wanadoo.fr> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="koi8-u" Content-Transfer-Encoding: 7bit Message-Id: <200306102057.54489.oleg_trott@columbia.edu> X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.32 (www . roaringpenguin . com / mimedefang) X-Spam: no; 0.00; oleg:01 caml-list:01 camlp:01 pierre:01 newbie:01 scheme's:01 ocaml:01 lisp:01 simpler:01 preprocessor:02 syntax:02 arbitrary:02 o'caml:02 comparison:02 macros:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Monday 09 June 2003 05:55 am, Pierre CHATEL wrote: > Hello, i'm kinda new to the list, so i hope my newbie questions will > not disturb everyone :)) > > So, i was wondering if there were something like Scheme's hygienic > macros with the Camlp4 preprocessor, or even if it does make sense with > it. > More generally, i'm looking for some good point-to-point comparison > between OCaml and Scheme on the macro side...if u know some good > ressource on that, please point it to me ! > > Thanks, If you want to know the difference between Camlp4 and Scheme macros, add the difference between Camlp4 and Lisp macros to the difference between Lisp and Scheme macros: C - S = (C - L) + (L - S) :) Lisp has much simpler syntax than O'Caml (some say that Lisp has no syntax), so any kind of "pre-processing" is easier. Also, when you define a Lisp macro, all functions, values, types, etc. that were or will be defined or set before you call the macro can be used in the macro definition. As to Scheme macros, I'm familiar with them very superficially (i.e. from reading about them) My understanding is that they are quite a bit less powerful than Lisp macros, so they don't let you do "arbitrary" things, but the above considerations still apply. -- Oleg Trott ------------------- 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