Mikera <
mike.r.an...@gmail.com> writes:
> This is useful information - thanks Alex!
>
> Might be worth putting some of this on a Clojure.org page somewhere,
> perhaps linked to the Java interop section?
>
> As someone who quite regularly interfaces to Clojure from Java, it would be
> useful to make *some* of the interfaces into an official public Java API.
> The ones I'm thinking of in particular are:
> IFn
> ISeq
> ILookup
> IPersistentMap
> IPersistentVector
> IPersistentList
> IPersistentCollection
> IMeta
> IObj (for metadata updates)
>
> Together these give just enough API surface area to efficiently navigate
> Clojure data structures, which is pretty crucial for interop......
I'm not sure this is just an interop issue. As the website says:
"Clojure is written in terms of abstractions. There are abstractions for
sequences, collections, callability, etc. In addition, Clojure supplies
many implementations of these abstractions. The abstractions are
specified by host interfaces, and the implementations by host classes."
For these abstractions to be useful, they must be usable in "client"
code. Otherwise, they are an implementation detail.
I guess, in the abstract (oops), the problem is that ISeq is a Java
interface, when really it should be a protocol, i.e. defined in Clojure.
In the meantime, documentation would be good!
Phil