2 small things I hope to be improved


Hey guys. I’ve been using kotlin for about a year now. The best language so far in the market today.
But the are some small things I believe should be improved for future releases and I would like to share with you.

Auto assign null to nullable vars.
When you declare a nullable var you have to write like that:

var myVariable : String? = null

Would be much more readable if we could just write:

var myVariable : String? //The compilers would automatically assigns null to that variable

Lateinit to primitive types.
I understand the limitation to that due to the reflection stuff and so… But would be too hard for the compiler to make this:

lateinit var myPrimitiveVar : Int

to become this …

var myPrimitiveVar : Int by Delegates.noNull()

…in compile time?

These are 2 small things I really hope language engineers to make real in a future release.

Thanks JetBrains for all effort on that awesome language.