Really nice article for beginners! But you overlooked few things that may be useful. First of all yes, in Kotlin variables are shown as objects but in fact in JVM they are primitives for better performance ( unless they are null-able then they are objects ). In fact when you have a null-able value you effectively create geter and setter method and a local variable(and this will be object since primitives can't hold nulls). String templates also does work slower than in Java since it is just glorified + operator, and in bytecode kotlin create string builder ( just like in java ) but sometimes perform one more operation depends what you do in string template. 🙂 Also null safety is not free, INVOKESTATIC nullcheck is called when its needed so its has some overhead but not much.
07/02/2018, 7:32 AM
I really appreciate your feedback. This added new information in my knowledge. Thanks 🙂