Align Kotlin collections with Java 8 streams API


Can anybody compare Kotlin's functional API to Java's collections with the Java 8 Streams API? What is a reason to use one or the other?

Given that the language is not finalized yet, does it make sense to change the Kotlin API (i.e. start using the JDK functional interfaces, align the method names, etc) so that switching between these would be easier (involving fewer code changes, esp. when using inferred types)?


The problem with the Java 8 Stream API is, that it is only presented in Java 8.

Kotlin on the other side runs on JRE 6+, so they cant use the Stream API there and had to implement their own API


There is a related previous thread -

> Currently we seem to come to a conclusion it was a mistake as we cannot fine a way to represent Stream<T> as kotlin type in Java 6 & 7, and then use to Java8’s Stream<T> when targeting JDK8. If you have any idea about how to make it work – please share!

So that reads as if there is an outstanding issue to resolve here.