Stuart Sierra wrote:

> FYI, the reason "and" doesn't work is that it's a macro, not a
> function.  Only functions can be used with "apply".

When I found that out, I was surprised. My knowledge of lisp comes
from reading, in the past few months:
- ANSI Common Lisp
- Practical Common Lisp
and, some years ago, a few more things.

And still, I wasn't prepared for the fact that macros don't mix 100%
with functions. Either I overlooked an important section in these
books, or they didn't really cover it much.

Even now that I hurt myself against this limitation, I'm still to make
complete sense out of it. I understand that macros aren't known to
functions because functions only get to see their expansions, but it's
fuzzy in my mind how some functions interact well with macros while
some others don't.

It's probably related to the fact one wouldn't want to rely on
repeated macro-expansions while apply/reduce's implementation recurs/
iterates over a seq. So in some way, macros would be limited so that
they are only valid if their call arguments are provided to them at
compile time, not at run time. Yet, it's still hard to see the line
between code-is-data and data-is-code.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to