voddan
07/22/2017, 7:52 AMbreandan
07/30/2017, 2:28 AM[1]
is any different from arrayOf(1)
.voddan
07/30/2017, 10:52 AMvoddan
07/30/2017, 10:58 AMarrayOf(1)
are identical. This is how Java do it, after all. The problem is that in Kotlin it is recommend to use lists instead of arrays. JDK arrays do not implement the Iterable
interface, and thus they can't reuse all the nice operations for lists. Therefore it makes little sense to improve arrays initialization, and instead [1]
should create a list if implemented.voddan
07/30/2017, 11:03 AMvoddan
07/30/2017, 11:11 AM