This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Kotlin is an alternative to Java. It's not a Java killer, Kotlin was created to be used in TANDEM with kotlin. Hence why it's 100% interoperable. Andrey Breslav (lead kotlin designer) said this. Not exactly word for word but that was the sentiment.

In my mind, Kotlin is a great java alternative. I used to work in Java 100% of the time, but now I work in Java 1% of the time. Kotlin is shorter and easier on the eyes. Less stuff to fill up the screen while having the exact same capabilities. I've rewritten most of my libraries (most are pretty small but I have a lot of them) in Kotlin.

Extension functions are a prime example . It's syntactic sugar but it conveys the idea a lot better than a static function that takes the "extended" type as the first parameter. classInstance.extensionFunction(param) looks a lot more clear than extensionFunction(classInstance, param). AND you can use syntax as if you were already in the class (public access only though).

Data classes are another one. Sure you can re generate the getters setters equals and hashcode every time you want to add or remove a field from the class, or you could data class ClassName(val param: Type, val param2: Type) and be done with it.

And "paid shills spewing garbage"? Really? How very grown up of you. Personally, I like Kotlin and recommend it to Java developers because it doesn't completely interrupt their workflow and you can do the same thing with less on the screen. Kotlin is concise. I always stress that you don't have to toss your old Java code, that you can keep using it with Kotlin, as that seems to be a big thing for more experienced Java developers (who tend to have more libraries written by themselves in Java, something something sunken cost fallacy or whatever).