How are they different than: <https://github.com/K...
# announcements
a
🧵 2
☝️ 2
a
immutable-kotlin
 is based on algebraic data types (e.g. functional sum types, an immutable list is built as 
list(a, cons)
).  It also includes a larger menagerie of functional structures, all algebraic data types.
n
The problem is that an immutable list like that is simply a linked list
And tends to have really poor performance characteristics, e.g. does not provide proper random access which is a rather key part of the List API. What you typically see nowadays for a general purpose immutable list are trees of sorts that store mini arrays, and have branching factors of 32, something like that.
Immutable data structure implementations in general tend to get pretty complicated in practice because it tends to be very difficult to balance all the desirable performance characteristics
a
You described an immutable "array" in Scala 🙂. I'm well aware of that aspect of functional data structures. That is the reason I wondered if anyone is interested.
n
Indeed 🙂 I think the kotlinx implementation is based on that (though I could be wrong)
s
see also #C1JMF6UDV, #C5UPMM0A0
a
Thanks, I will move to #C1JMF6UDV, it's probably a better home for this special interest subject.