Re: Python gets macros - now XML does too
From: jayessay (nospam_at_foo.com)
Date: 01/05/05
- Next message: Florian Weimer: "Re: Python gets macros - now XML does too"
- Previous message: Kenny Tilton: "Re: Have you bought Practical Common Lisp?"
- In reply to: Manuel Lemos: "Re: Python gets macros - now XML does too"
- Next in thread: Manuel Lemos: "Re: Python gets macros - now XML does too"
- Reply: Manuel Lemos: "Re: Python gets macros - now XML does too"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 05 Jan 2005 17:41:47 -0500
Manuel Lemos <mlemos@acm.org> writes:
> Hello,
>
> on 12/18/2004 08:08 PM Frank Buss said the following:
> > I think the main advantage: You use Lisp within a Lisp macro to
> > generate Lisp code. I don't know how your system handles this (this
> > was one reason, why I asked you to provide a translation of my
> > simple example, to learn how your system works), but I think it is
> > cumbersome to implement the code generation part in another language
> > than the description to generate the code.
>
> MetaL compiler flow module provides support for level 0 (macro
> expansion) metaprogramming but IMO that is a very limited form of
> metaprogramming.
>
> Unless I misunderstood anything about LISP macros, it is not even
> unique to LISP. C has support for macros via the preprocessor, C++ has
> template classes and Java now has generics. There is no point in
> comparing the capabilities of each language macro expansion
> capabilities because that is not the topic here.
You have indeed misunderstood basically _everything_ about what Lisp
macros are and what capabilities they provide. They do not operate on
text, but on the preparsed syntax trees derived from the textual
input. There is actually nothing in MetaL that you can't do with Lisp
macros, if for no other reason than you could implement MetaL _as_ a
Lisp macro(s).
> The real power comes from level 2 metaprogramming features and
> eventually beyhond. Level 2 means that you write a code specification
> in an high level syntax. That that specification is translated into
This sort of thing is done all the time with Lisp macros. In fact
that is probably their main use, i.e., defining and implementing
domain specific languages. These, of course, provide for very high
level syntax for the description of terms, problems, and solutions in
the language of the domain.
/Jon
-- 'j' - a n t h o n y at romeo/charley/november com
- Next message: Florian Weimer: "Re: Python gets macros - now XML does too"
- Previous message: Kenny Tilton: "Re: Have you bought Practical Common Lisp?"
- In reply to: Manuel Lemos: "Re: Python gets macros - now XML does too"
- Next in thread: Manuel Lemos: "Re: Python gets macros - now XML does too"
- Reply: Manuel Lemos: "Re: Python gets macros - now XML does too"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|