why is the interface IRef
used here? It seems it only needs IDeref
?
https://github.com/clojure/clojure/blob/653b8465845a78ef7543e0a250078eea2d56b659/src/jvm/clojure/lang/MultiFn.java#L21
does IRef
predate IDeref
?
seems it does
It seems like no matter how small you make an interface, you later on find a use case that only needs part of it
That is, the ideal number of methods on an interface seems to be 1
Or <= 1
(`clojure.lang.{IRecord,IType,MapEquivalence,Sequential,etc}`) :)
I'd still say the ideal is 1 - marker interfaces not being much of an affordance to do stuff, just to annotate stuff
too bad you can’t have negative interfaces - only define what you can’t do
perhaps the ideal number would be -1