caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Oleg Trott <oleg_trott@columbia.edu>
To: Pierre CHATEL <addikted2@wanadoo.fr>, caml-list@inria.fr
Subject: Re: [Caml-list] Camlp4, macros an thoughts
Date: Tue, 10 Jun 2003 20:57:54 -0400	[thread overview]
Message-ID: <200306102057.54489.oleg_trott@columbia.edu> (raw)
In-Reply-To: <7AD4D407-9A60-11D7-8095-0003930EC608@wanadoo.fr>

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


      reply	other threads:[~2003-06-11  0:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-09  9:55 Pierre CHATEL
2003-06-11  0:57 ` Oleg Trott [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200306102057.54489.oleg_trott@columbia.edu \
    --to=oleg_trott@columbia.edu \
    --cc=addikted2@wanadoo.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).