If you need an array of primitives, like an array of ints, use a specific type like 'IntArray' rather then 'Array<Int>' #KotlinTips
10
48
383
0
9
Download Image
@kotlin What is the advantage besides type during runtime? Is it performance difference?
@kotlin The compiler should do that, not me.
@kotlin isn't this just a workaround for a language desing flaw?
@kotlin Started using this a few weeks back, now there's no going back.
@kotlin Since all types in Kotlin are Objects, it is important to understand this function, that's why we can decide whether using an object or primitive for performance benefits.
@kotlin @cortinico it is possible to add this check to detekt?