Steven E. Harris wrote:
[EMAIL PROTECTED] writes:
What is the reason modern scripting languages have rejected macros?
Part of the reason is that these languages lack the simple syntax of
Lisp, and lack the parity between surface syntax and the AST that
makes writing macros not only possible, but possible without adding
yet another language into the mix. Lisp macros are written in Lisp;
they receive Lisp as input and emit Lisp as output.
Bingo.
If you look at Scheme's hygienic macros vs. Common Lisp macros, your
brain just hurts. The hygienic macros have *sooo* much more verbosity
to attempt to avoid the pitfalls of Common Lisp macros. And that's
*still* within a Lisp syntax. If you look at some of the AST
manipulators from Python, they are just pure, unadulterated torture.
Personally, I prefer the Common Lisp macro implementation. Given how
often I see Scheme systems implement a Common Lisp-like macro, the
Scheme implementers think so, too.
The interactivity is a facet in a whole different category, but any of
these features can be useful in any program. Try turning the question
around: When do you know that you wouldn't use any of those features?
Why decide a priori that you'd rather not have them available?
That's too strong. These features are not necessarily "unavailable".
They are normally just more annoying to deal with.
Just like Lisp has libraries, foreign function interfaces, threading
systems, package systems, etc. but they are more annoying to deal with
than in Java, Perl, Python, etc.
The problem, though, as Paul Graham and many others writing on
comp.lang.lisp have explained, is that one can never borrow enough
from Lisp without becoming Lisp. The crucial aspects that make it
unique are interrelated and somewhat interdependent.
I disagree. There are some days that I do *not* want Lisp. Lisp makes
the tough things possible, but it often makes the simple things annoying.
Sometimes, I want a language with an intelligent set of "defaults" so
that I can concentrate on the simple task ahead of me without having to
set all of the "defaults" myself.
-a
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list