3 ms·
Kotlin has its own (much better IMO) alternative to streams: Sequence. I see absolutely no reason to use streams in Kotlin.
by vbezhenar 8y ago
Kotlin has its own (much better IMO) alternative to streams: Sequence. I see absolutely no reason to use streams in Kotlin.
- sievebrain 8y agoThe Java 8 streams library can auto parallelize things. That's the main reason it was created in fact!
- elcomet 8y agoOne simple reason: you already know streams and don't have time to learn sequence.
- ptx 8y agoStreams is mostly just Java's version of what many languages already had, so the concept was something new to learn for Java developers, but once they know it they shouldn't have much trouble with Kotlin's sequences – or with Python's list comprehensions, Lisp's mapcar, and so on.
- EdwardDiego 8y agoSure, but the point is, you can.