On Sun, May 17, 2009 at 8:12 PM, David Nolen <dnolen.li...@gmail.com> wrote:
> Have you looked at the immigrate function in Compojure? This imports public
> vars from a different namespace into a namespace as if they were defined
> there.  Maybe this is enough to get the behavior that you want?

Not really.  Consider the following:
(ns testns1)
(def a 2)
(defn b [] a)

Then:
(ns testns2)
(immigrate 'testns1)
; Let's try to redefine global variable a
(def a 4)

(testns2/b) will still return 2.  That's because even though b has
been "immigrated" to the testns2 namespace, the var a in the body of b
still refers to testns1/a.

So no, I don't really see how immigrate helps.

--~--~---------~--~----~------------~-------~--~----~
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