Does it make sense to type hint a Java interface vs. a concrete class?
I have clojure code that is going to be passed some sort of Iterable that I don't know ahead of time so I was wondering if I should do:
(let [^Iterable i (:val m)]
...
(.size i))
to avoid reflection on the .size call.Yes, usually better
Although Iterable doesn’t have a size method
Thanks. And also, good point.