On 02/03/2009, at 7:23 PM, Konrad Hinsen wrote:

> For namespaces other than clojure.core, an acceptable solution is to
> use the :only keyword in the :use clause of the ns macro. This just
> requires a bit more work in typing, but I don't see any other
> potential difficulty. I am currently converting all my code to
> use :only, and I haven't had any bad surprises until now. For
> clojure.core, listing all imported symbols explicitly would be a real
> pain, but I don't see any other simple solution. I just hope someone
> else does :-)

I'm a clojure newb, but couldn't you reflect on a given version to  
generate an import file that used :only to import every name visible  
in that version? Then you could import that file, which would be a  
version constant (although I'm not clear yet if clojure allows  
transitive imports). It should be easy to generate such a file  
privately for any given snapshot (although I imagine it would be best  
as an official version artifact).

Alternatively of course every name could be tagged with version  
metadata and import enhanced to take a version spec, but that seems  
far more intrusive (and in any case precisely equivalent to my first  
suggestion).

Antony Blakey
-------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

There are two ways of constructing a software design: One way is to  
make it so simple that there are obviously no deficiencies, and the  
other way is to make it so complicated that there are no obvious  
deficiencies.
   -- C. A. R. Hoare



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