Does Kotlin or Kotlin/Native specifically I suppos...
# kotlin-native
k
Does Kotlin or Kotlin/Native specifically I suppose have an array that stores its elements in a contiguous block of memory? Something like Swifts ContiguousArray? Or is would the standard Array be the closest bet?
k
I am happy to be schooled here, but my understand is that in Kotlin, high level collection types like
List<T>
are guaranteed to be stored in contiguous blocks of memory, but
Array<T>
and primitive array types are. That’s why arrays have to have a pre-defined size as they’re being allocated as a single block of memory up front.