This is related to Clojure Vectors? , but the direction of the question is different, so I am posting as a new topic.
Question: Does Kotlin plan to have support for persistent data structures ? https://en.wikipedia.org/wiki/Persistent_data_structure
Clojure, for example, has implementations for Sets, Maps, Vectors.
The advantage of a persistent data structure is that instead of destructively modifying a data structure, we create a new one via sharing, often in O(log n) time. Some people would argue that this makes code ‘more functional/pure’ and easier to debug.
The disadvantage of persistent data structures is that (1) in general, they have worse big-O constants and (2) O(1) ops often become O(log n) ops // generally via some ‘tree structure’ to enable sharing.
I am wondering if Kotlin itself (instead of external libraries) has plan to support persistent data structures for the commonly used structures (or if not, how it is against Kotlin philosophies ).