Are macros still an enormous edge in the power of a language?
magice: The issue of macro is that it is, by itself, not a power. It's like how knife by itself is not food. However, knife can make you food. That's the main point.Imagine this Christmas, Perl 6 is out with some killing features. Now, your language (Python? Haskell? ML? Whatever) does not have these features. What would you do?You have 2 choices, basically:
a. forget about that features, write a long blog in which you prove how your language can do just the same thing, albeit "a little" less elegant
b. Switch to perl. This is not always possible, btw, since you may sacrifice some OTHER features that your language has.How about a LISPer? Well, simple, let's implement these features. Keep in mind: All languages are Turing equivalent, meaning they can do roughly the same thing. There are two differences:
1. some do some task more elegantly (aka easier to maintain) than others.
2. Some have better support (eg. corporates, community, etc.) than othersThus, you CAN always write the exact same features in LISP. Now, the definition of the macros WILL be messy. However, as a good practice, you spend 2 days debug that holy mess, and jam it into a file you banish somewhere with a dot precede the directory. Next time, you can use the features, pretending that you are using Perl 6!This is my strategy. My Scheme code always has for-loop (purely functional, too), foreach-like, OO-like features. Of course, Scheme (remember, it's not even CL) does not provide these, but I can either implement them or find the implement somewhere. I have once even try to implement Icon-like mechanism with Macro + Continuation (okay, the Scheme implementation that time was a bit fuzzy, so I failed. But, with pure Scheme, it SHOULD be possible). That's the main power: you can copy others' ideas extremely fast! Without throwing away your old code, too. Hurray to Macro!