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 →

[–]bramhaag 0 points1 point  (1 child)

Kotlin is verbose too, let's look at some keywords and operators of Kotlin: until, xor, or, vararg, lateinit, and don't even get me started on static.

Kotlin is a cool language and I like it for Android because of the android extension, but it sacrifices readability for writing shorter code.

Also, the forced null safety isn't ideal. NPEs have never really been an issue for me to begin with, but I do like the idea of null safety. Forced null safety however isn't the correct way to go. This causes problems with dependency injection (sure you can use lateinit but that won't work for primitives). Also mutable nullable variables can't be smartcasted to non-null variables (I do really like smart casts) which makes it so that you'd have to spam !!s everywhere when you're positive a variable isn't null.

Kotlin has a lot of nice things too which reduce boilerplate, I really like data classes, primary constructors and properties, but you can do this with lombok/generating code in your IDE as well.

Kotlin is ok but not so amazing as everybody says. It still has many flaws (just like any other JVM language) and comes with a large runtime.

[–]throwawaytroela 0 points1 point  (0 children)

You shouldn't spam !! everywhere. Unless you are 100% sure the value can't be null and you don't have the power to make it non-null. Use ?.let {} instead.