On Oct 23, 2008, at 2:50 AM, [EMAIL PROTECTED] wrote:

> Who is casting which Boolean to what there? And, more importantly,
> what do I need to fix in my code line?


Hi Konrad,

Here is the correct syntax for 'use' in this case (with the current  
SVN Clojure which now defines clojure/remove):

user=> (use '[clojure.zip :rename {remove zip-remove replace zip- 
replace}] :verbose)
(clojure/in-ns 'user)
(clojure/refer 'clojure.zip :rename '{replace zip-replace, remove zip- 
remove})
nil
user=>

The arguments to use are:

        - libspecs
                - a lib name, or
                - a vector containing a lib name and key-value options
        - a prefix list
                which is a list beginning with a prefix that should be 
prepended to  
all the lib names in the libspecs that follow, and
                libspecs (names or vectors) with the lib name shortened by 
excluding  
the prefix
        - flags (:verbose, :reload, :reload-all)

The argument structure is intended to be flexible to use.  
Unfortunately, that leads to some things being legal, but not what you  
were hoping for, and some things being illegal but giving a confusing  
message. I submitted a patch recently to improve error checking in use  
and require, but it hasn't yet been accepted, and while it would help  
in some cases, it wouldn't have helped you here.

Clojure could validate all the arguments to use/require and I think it  
should since this appears to be frequent tripping point for folks.

Opinions on the value of that are welcome.

--Steve


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to