bdawg.io
06/05/2018, 4:39 PMIntArray and Array<Int>? If so, is there a reason why the compiler doesn’t treat them as type aliases?diesieben07
06/05/2018, 4:40 PMArray<Int> is an array of boxed values (like java.lang.Integer). IntArray is an optimized array of primitive values.rook
06/05/2018, 4:43 PMIntArray is int[] whereas Array<Int> is Integer[].diesieben07
06/05/2018, 4:44 PMdiesieben07
06/05/2018, 4:47 PMIntArray is using typed arrays, Array<Int> is just a normal javascript array, as far as I know.rook
06/05/2018, 4:51 PMbdawg.io
06/05/2018, 6:01 PMbdawg.io
06/05/2018, 6:04 PMInt to int and Int? to Integer when the type is alone? So it seems odd to me that Array<Int> isn’t converted to int[] but still have Array<Int?> go to Integer[]diesieben07
06/05/2018, 6:10 PMArray<Int> needs to be assignable to things like Array<out Any>.diesieben07
06/05/2018, 6:11 PMArray<Int> compiled to int[], every array would have to be represented as Object on the JVM and you would have to use java.reflect.Array for all accesses.bdawg.io
06/05/2018, 6:14 PM