Comment made by: bbloom
I looked up this ticket because I ran in to a reflection warning: with-open does not hint it's binding with java.io.Closeable
Some feedback on the patch:
1) This is a breaking change for anyone relying on the close method to be duck-typed.
2) CloseableResource is a bit long. clojure.core.protocols.Closeable is plenty unambiguous.
3) Rather than extending CloseableResource to java.io.Closeable, you can use the little known (undocumented? unsupported?) :on-interface directive:
(defprotocol Closeable
:on-interface java.io.Closeable
(close [this]))
That would perform much better than the existing patch.