Chas Emerick
unread,Jan 15, 2013, 8:38:34 AM1/15/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cloju...@googlegroups.com
math.combinatorics has a (comment) form ahead of its (ns) declaration. This generally won't be a problem, as it will be evaluated within the namespace that is loading math.combinatorics; however, if that namespace's (ns) decl is uses :refer-clojure after its :require of math.combinatorics, `comment` will not have been referred into *ns* before the math.combinatorics lib is loaded:
user=> (ns foo
#_=> (:require clojure.math.combinatorics)
#_=> (:refer-clojure :exclude (read)))
CompilerException java.lang.RuntimeException: Unable to resolve symbol: comment in this context, compiling:(clojure/math/combinatorics.clj:7:1)
It looks like I have commit on math.combinatorics; I hope no one will mind if I move that comment form after the ns to eliminate this particular problem (it looks like Mark isn't really active on that lib anymore?).
Is it intentional that the use of :refer-clojure should change behaviour like this? I presume not; would it be reasonable to always lift the refer of clojure.core to be the first action in the with-loading-context emitted by ns?
Cheers,
- Chas