On Tue, Jan 18, 2011 at 7:53 AM, Seth <wbu...@gmail.com> wrote:
> Theres a subtle problem here that makes both solutions not work in
> some cases.
> I am trying to reexport error-kit, and it makes use of a var #'handle,
> and in the macro with-handler, it tests if there is a handle  = to
> #'handle. If you define a var in your own namespace named handle, it
> will of course not be equal to #'clojure.contrib.error-kit/handle.

It checks the var objects themselves? NOT the held values?

> When you 'use' error-kit, it maps from the symbol handle to the
> #'clojure.contrib.error-kit/handle , so everything works. However, all
> exports from your namespaces have to have a (.ns var) = to the current
> namespace - a clear contradiction. Therefore, it is not possible to
> use the function 'use'. One would have to create a different function
> to get this to work - maybe put a 'export' metadata and have the new
> use function search for that.

That would require re-engineering chunks of the core functionality of
Clojure; particularly the use function and ns macro.

It might be slightly easier to get error-kit re-engineered not to
depend on equality of var objects instead of their held values. (If it
needs to check for identity of holders of mutable state, it can use
atoms held by normally-treated vars.)

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