News for hackers. Stuff that matters.
Re:From zero to 10M lines of Kotlin by mcv on Tuesday October 25, 2022 @11:38AM (#33332050)
> In your own code you should always use one of collection classes, usually Iterable, Collection or List, depending on which features you need.

Yes, but every library I use requires or returns a different one.

> list.stream().map(...).toList()

But why not list.map(...)?

Re:From zero to 10M lines of Kotlin by kaeruct on Tuesday October 25, 2022 @01:08PM (#33333341)
In this specific case I think it is because stream operations can be implemented lazily - they only run once you call toList()