DEV Community

Discussion on: Why use Kotlin for Android development? Kotlin benefits, features, versions

Collapse
 
tedhagos profile image
Ted Hagos

There's an article about Kotlin in here;

There's a portion in it where Streams are discussed; short answer is
  • Kotlin has Streams
  • All collection classes in Kotlin already supports the one-time_iterator behavior of java.util.stream.Stream instance
  • Kotlin doesn't need the initial conversion (collection to stream) and the final conversion (stream back to a collection)
  • BUT remember that Java streams are lazily evaluated while Kotlin streams are eagerly evaluated unless you convert to a Sequence