On 3 February 2010 17:14, Stephen C. Gilardi <squee...@mac.com> wrote: > I believe it's also possible to make the change backward compatible so > arguments to the new require macro would work quoted or not. (by detecting > and ignoring (quote ...) special forms in arguments).
That's a good idea! A simple-minded macro like the one I posted previously would throw a totally unhelpful exception when used at the REPL in the old way. A version amended to take this into account: (defmacro require [& libspecs] (let [lss (map (fn [spec] (if (and (instance? clojure.lang.Cons spec) (= 'quote (first spec))) `(do (println "warning: use of quoted namespace names with require is deprecated") spec) `'~spec)) libspecs)] `(require* ~...@lss))) This would of course still break any code actually depending on require being a function, so it's only backward compatible in REPL use... Sincerely, Michał -- 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