Hi, On 8 Dez., 16:32, "Mark Volkmann" <[EMAIL PROTECTED]> wrote: > I have some questions about the following: > > (use '[clojure.contrib.str-utils :only (str-join)]) > > Why is the vector quoted? Is that because we need to quote everything > inside the vector?
You don't have to quote the vector: (use ['clojure.contrib.str-utils :only '(str-join)]) So yes: quoting the vector quotes everything inside. > If so, what does it mean to quote the keyword :only? Nothing. ':only is the equivalent to :only. If you quote everything else you can leave the :only alone. > Why is the parameter to the use function a vector? It's not necessarily a vector: (use 'clojure.contrib.str-utils) (use '(clojure.contrib str-utils def)) (use '(clojure.contrib str-utils [def :only (defvar defstruct-)])) The vector is used to associate parameters like :only or :as to a given namespace. > Why can't the third item in the vector, (str-join), be specified with > the symbol str-join instead of a list? It is possible to specify multiple arguments here (see above example). Providing a non-list argument as a synonym for a list containing this single argument is maybe possible. I'm not familiar with the implementation, though. So I don't know how easy it is to include this. Another point I'd like to raise (when we are talking about use and require): Shouldn't require check, whether a namespace already exists instead of keeping its own list of loaded namespaces? Sincerely Meikel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---