On Jan 27, 2:32 pm, Raoul Duke <[email protected]> wrote:
>
> ok, thanks, i will try to internalize that :-)
>
> i am not somebody who can point to languages i have defined and
> implemented, so i don't have any cred, but i think the requirement
> that the programmer know such details (like i have to know what is or
> is not a macro in the system at all times) is less than ideal for the
> end-user-programmer.
>
> sincerely.
In general, if you see a form that looks like it's a special language
and wouldn't evaluate its
contents before executing the form then it's a macro.
With clojure.core/ns, you can reason that in the form (ns foo), ns
must be a macro because otherwise
the evaluation of foo would cause an error (or in the case you had
defined a foo, you'd get a namespace named after
the contents of foo, not the symbol foo).
You can always check by examining metadata.
(meta (var clojure.core/ns))
;; or more succinctly,
(meta #'clojure.core/ns)
You'll see a key-value pair of {:macro true} in the metadata map.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en