One objection I would have here (if I understand the concepts as intended, please correct me if I’m wrong) is that the Readable
/Writable
traits are based on Java’s InputStream
and OutputStream
.
These interfaces expose blocking operations, while the majority of the Scala ecosystem (as well as a large part of the Java ecosystem) is already based on non-blocking operations, or in the process of migrating towards them.
My intuition would be that if we were to standardise on anything, it would have to support non-blocking streaming, with back-pressure. A natural candidate seems to be reactive streams, or something based on reactive streams, which can be created and consumed by normal code (“plain” reactive streams are not meant to be interacted with directly). Plus, RS is part of Java itself. I suspect Akka/Lightbend teams would have a lot of expertise here to share as well.