Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're correct of course, but to back up the parents comment, they do have a habit of implementing things other than the low hanging fruit that developers are frustrated not having, leading the drive towards other jvm langs


What are some examples of those low hanging fruits?


Functional/SAM interfaces (transforming interfaces with a single method into a simple lambda), pleasant usage of lambdas (last lambda parameter can be put outside of the call like(this) { ... }, leading to a language that lends itself really well to building a DSL, coroutines were not a low hanging fruit but absolutely are infinitely more pleasant to use than RxJava, operator overload including invoke(), ranges that are pleasant to use (0 .. 10).forEach { }, or when (floatVariable) { in 0.0f .. 1.0f -> ... }, pattern-ish matching with when (not quite full on functional language powerful, and I believe that Java is not only catching up to it but making their switch quite a bit better), a standard lib that is packed full of extremely useful and consistently named methods, extension functions, delegation (if you inherited a SDK that has a piss poor interface, you can simply make a SDKWrapper(val internalSdk: SDK): SDK by internalSdk, which means that it will automatically implement it, and you can then have your wrapper do whatever around it (logging, better functions, DI, etc.)))

Kotlin is truly a pleasant language, both when you don't know it (although it can look a bit symbol soup-y at times for juniors), and when you fully know it.


Just browse through the Kotlin standard library. It's basically just a set of mappings to the Java standard library with a whole lot of extension functions to make it easier to use.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: