As much as i love kotlin, i hate that you dont have static functions like in java. You have to put them in a companion object or write them in extension functions outside of the class.
Also when working with generics (lets say T) you cant call T::class.java unless you are in an inlined function and mark T as refeied. This is not the case in java i think. I havent checked.

  • 1
    For static functions, create a kotlin file and put in your functions and import them in your parent class. I think this is closer to how Java handles static classes.
Add Comment