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

I think kotlin is what Java should have been like. The same capabilities but with less cumbersome constraints.


When I used Kotlin, it felt like Java, but with the antipatterns baked in as language features.


Could you explain which antipatterns you're referring to?


Leaning heavily into object orientation, including baking in things like companion objects, object expressions, etc. Encouraging utility classes that tack half-baked functionality onto existing types. Smart casts encouraging overly complex hierarchy.

While operator overloading and infix functions aren't a Java anti-pattern, I also think the language would be improved by their removal.


Even if you sincerely believe that OOP is an anti-pattern, surely it was firmly "baked into the language" in Java already? Kotlin is fundamentally a better Java, not a rebuttal to Java.


It is all but impossible to use Kotlin without an IDE telling you everything, and for that I find the language interesting. And for comparison, I did in fact write Java without an IDE for an extended period of time.




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

Search: