Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Basile STARYNKEVITCH <basile@starynkevitch.net>
To: Ed L Cashin <ecashin@uga.edu>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] my first questions about camlp4
Date: Thu, 22 May 2003 19:16:38 +0200	[thread overview]
Message-ID: <16077.1526.521835.393248@hector.lesours> (raw)
In-Reply-To: <87y90zvunc.fsf@cs.uga.edu>

>>>>> "Ed" == Ed L Cashin <ecashin@uga.edu> writes:

    Ed> "Dont Bother" <dont_bother@whoever.com> 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: basile<at>starynkevitch<dot>net 
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
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


  reply	other threads:[~2003-05-22 17:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-22  2:51 Dont Bother
2003-05-22 16:00 ` Ed L Cashin
2003-05-22 17:16   ` Basile STARYNKEVITCH [this message]
2003-05-22 19:48     ` Oleg Trott
2003-05-22 19:50     ` [Caml-list] Camlp4 and hashtable Lukasz Lew

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=16077.1526.521835.393248@hector.lesours \
    --to=basile@starynkevitch.net \
    --cc=caml-list@inria.fr \
    --cc=ecashin@uga.edu \
    /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