On 14 February 2010 08:09, Mike Meyer
<mwm-keyword-googlegroups.620...@mired.org> wrote:
> First, is there either a way to use names that exist in clojure.core?
> I.e., if wanted variable called map, can I get it somehow? If not, is
> there an idiom for such names, akin to Python's use of a postfix _ for
> variables whose names would otherwise be keywords?

You can use any symbol which is not special (which tests false with
special-symbol?) as a name in your namespace. If there happens to be a
collision with something defined by clojure.core, you'll need to use
the :refer-clojure clause in your ns declaration; the docs on ns
actually give an example.

Well, actually Clojure won't protest if you define something with a
special name... But it won't work very well, so just don't. Not that
you'd ever want to, as things with special names are needed
everywhere.

For your second question, not that I know of, but I'm not totally sure
there isn't. You can simplify :require / :use clauses with a common ns
prefix, though: e.g. (:use [clojure.contrib sql seq]) instead of (:use
clojure.contrib.sql) followed by (:use clojure.contrib.seq).

Sincerely,
Michał

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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