the lambda syntax allows for really nice DSLs (check gradle), as well as allowing you to embed code in config files n stuff
the multiplatforming ability is awesome
im currently working on a web game, and both the frontend and backend are in kotlin
it also allows you to share code across platforms, so i dont have to do a ton of duplication
back to lambdas: you dont need to put parentheses around lambda args if its the last one
so as well as having syntax like list.map { it + 1 }
, you can also make functions that look like inbuilt structures
i.e. with(obj) { code }
is actually a stdlib function taking an obj and a lambda
receiver objects allow you to have an implicit this
in lambdas
kotlin can target JS, JVM, iOS, Android, and can compile natively
one thing ii really love as well is extension functions
oh the nightmares of making tons of utility classes in java
now youve got extension methods
primary constructors are a really nice feature, as well as specifying fields in constructors allows you to remove a bunch of boilerplate
when
statements are a souped up switch
, with limited pattern matching
the absence of full blown rust style pattern matching is one of my main grievances with kotlin
the interop with java is the best in any jvm lang besides probably groovy
i commonly use java libs if i cant find a kotlin lib
its integration with gradle is the best
(gradle is another topic entirely)
the large amount of functional extension functions to collection types in the stdlib i love
no more Stream
s, no more for
loops just for a map