Forgive me if I'm misunderstanding, but you don't need to import a
protocol to use it. If you need to actually get ahold of the protocol
(say, to implement another deftype/defrecord), you can just use
`require` or `use` to get ahold of it:
(ns stuff
(:use [com.example-ns :only [IFoo])
(:import [com.example-ns Foo]))
Then inside that ns, you can just refer to IFoo and Foo. I'm
surprised that the underscored version of the import works for a
protocol - I've never seen anyone use that before. I wonder if it's
just an oversight on my part or if that's a non-recommended use of
import...
Micah Martin just showed me a behavior very similar to this recently,
and since then I'd been thinking of protocols more like normal Clojure
data structures, and deftypes/defrecords more like Java classes.
Confirming that, if I look at the type of IFoo, it is a
clojure.lang.PersistentArrayMap, and Foo is a java.lang.class.
Colin