[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Oleg Trott <oleg_trott@c...> |
| Subject: | Re: [Caml-list] Camlp4, macros an thoughts |
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 <oleg_trott@columbia.edu> ------------------- 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