My understanding is that it is recommended now to use
require :refer
instead of use
in the ns
macro. For example, do:
(ns example.core
(:require [clj-json.core :refer [parse-string]]))
instead of
(ns example.core
(:use [clj-json.core :only [parse-string]]))
What is the recommended way to deal with :rename
which use
supports?
Specifically, let's say I want to require
clojure.data.zip and rename the ancestors
and descendants
functions which conflict with clojure.core.
In other words I'd like to know the require
equivalent for
(:use
[clojure.data.zip :rename {ancestors xml-ancestors,
descendants xml-descendants})