* [Caml-list] Camlp4, macros an thoughts
@ 2003-06-09 9:55 Pierre CHATEL
2003-06-11 0:57 ` Oleg Trott
0 siblings, 1 reply; 2+ messages in thread
From: Pierre CHATEL @ 2003-06-09 9:55 UTC (permalink / raw)
To: caml-list
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,
Pierre CHATEL
-------------------
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] Camlp4, macros an thoughts
2003-06-09 9:55 [Caml-list] Camlp4, macros an thoughts Pierre CHATEL
@ 2003-06-11 0:57 ` Oleg Trott
0 siblings, 0 replies; 2+ messages in thread
From: Oleg Trott @ 2003-06-11 0:57 UTC (permalink / raw)
To: Pierre CHATEL, caml-list
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-11 0:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-09 9:55 [Caml-list] Camlp4, macros an thoughts Pierre CHATEL
2003-06-11 0:57 ` Oleg Trott
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox