

"Macros: why they're evil" - paulgb
http://scienceblogs.com/goodmath/2007/12/macros_why_theyre_evil.php

======
pg
_There are ways around the syntactic capture issue, but they're very rare._

This is like saying there are ways to avoid an index going off the end of an
array, but they're rare. You avoid it by checking the length of the array.

Unintentional variable capture is simply a bug. The only reason it even seems
to people that they need a "way around" it is that they don't really
understand what macros do.

~~~
akkartik
> Unintentional variable capture is simply a bug.

That's a useful statement if you're discussing programming within a specific
language, not so useful to argue the language is fine as it is.

Funny you should mention array overflow; for years (we) C programmers insisted
it was 'simply a bug'. Then again, lack of hygiene enables anaphora, but lack
of bounds checking has no such redeeming qualities.

------
gruseom
_Lisp has a bunch of functions that generate new symbols that are guaranteed
never to have been seen before, but writing code that's completely safe, so
that it never accidentally captures or shadows an existing variable is a very
tricky skill._

Nonsense. The "skill" consists of calling one function (not a "bunch" of
functions).

For me, the hardest part of learning how to write safe macros was trying to
figure out why people kept saying it's so hard.

------
Hexstream
Let's see, this guy doesn't use (and doesn't even look like he's aware of the
existence of) backquote, and he thinks watching out for variable capture,
multiple evaluation and other well-known hazards with well-known solutions is
hard...

Never criticize that which you don't even understand the basics of, I say.

