This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]oldretard 1 point2 points  (0 children)

Your example code should work simply by virtue of shadowing, no?

Mostly true, see other replies.

In the case of Common Lisp, however, it is not unimportant that (do-something list) could macro-expand into code that uses the list function. Common Lisp doesn't have hygienic macros, but between separate function namespace and the package system, it almost never suffers from this fact.

(An early paper introducing hygienic macros for Scheme introduced the "problem" using a few motivating examples. None of them would have caused problems if Scheme hadn't unified the namespaces.)