5 ms·
In Java if you want to map a function over a list you write `list.stream().map().collect()` and in Kotlin you write `list.map()`. The functional programming API
by zests 6y ago
In Java if you want to map a function over a list you write `list.stream().map().collect()` and in Kotlin you write `list.map()`. The functional programming APIs in Java are atrocious. Lambdas are much easier to write thanks to anaphoric macros and other syntactic sugar. Data structures are immutable by default. A big one that isn't mentioned often is that functions can exist outside of classes so your code is not as tied to Java's style of OOP.