Erm, same can be done in Java with the Java 8 stream API.
I like Kotlin and use it with Spring, but articles like this where programming languages are not compared properly make me cringe.
Erm, same can be done in Java with the Java 8 stream API.
I like Kotlin and use it with Spring, but articles like this where programming languages are not compared properly make me cringe.
They wrote their own implementation of an earlier version, and at this point will probably never update its API to fully match Java 8 or beyond. Android devs who want advancements will have to add "shims", like retrolambda or (quite frankly) Kotlin.
These are small things, and easily corrected with a bit of know-how and/or utility methods. But I think it has had a huge impact on the (non-)adoption of streams.
Another obvious API gap: going from an iterator or iterable to a stream requires much more ceremony than it should.
That said, Sequence have very simple implementations while Java Streams are hairy monsters under the hood and you can use Java Streams from Kotlin without problems, if you're targeting JDK8.
Except maybe if you minAPI is something ludicrously high like 25, but that's not going to be the case for almost all apps in the coming year. Kotlin is useable right now.
Edit - http://www.infoworld.com/article/3180758/mobile-development/... it looks like Android is gaining Java 8 support now