Hacker News new | ask | show | jobs
by cetu86 888 days ago
While the author dislikes extension functions in kotlin they enable one feature that Java doesn't have: With them you can create domain specific languages within kotlin that are quite ergonomic.

- Jetbrains has built a nice reactive js wrapper with them. - The gradle configuration is written in a kotlin dsl.

They can be used to specify configuration and add meta information and thus replace Java annotations.

That is my kotlin "killer" feature because I personally don't like annotations.

Java's language design has always been "pedagogical" (or patronizing) to not give the developer to much power to create to much abstractions and complexity. So it's not just its age but also this philosophy that has made Java a rather inelegant language ( compared with e.g. kotlin)