Closed
Description
Hi!
Sometimes I may want to :require
something just for using the alias later for symbol construction, with no var usage.
For example:
(ns om.g
(:require
[protocols.xyz :as xyz]))
(defn abc-impl [this] ...)
(defn new []
^{`xyz/abc abc-impl}
{})
The above is a vanilla usage of metadata-based protocol extension, a new Clojure 1.10 feature.
If the ns didn't use xyz
for any vars, clean-ns
will wipe the require. And Clojure won't complain when compiling the ns again, since:
`xyz/abc
...is always a valid token.
Thanks - Victor