Is there a particular reason why `Closeable` inter...
# stdlib
t
Is there a particular reason why
Closeable
interface and use extension is not in the common stdlib? Thread in Slack Conversation
e
java.lang.AutoCloseable was added in Java 7, with java.io.Closeable retrofitted to extend it. stdlib is compatible back to Java 6, so https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/use.html can only be in stdlib-jdk7.
as for the kotlin.io.[java.io.Closeable].use, dunno. it does seem useful, various multi-platform projects have defined their own (e.g. https://github.com/square/okio/blob/master/okio/src/commonMain/kotlin/okio/-CommonPlatform.kt#L36)