I want to use immutable persistent collections, like the ones Clojure uses, in Kotlin. Which libraries can I use (both in the JVM and in Javascript)? How well they integrate with Kotlin?
Asked
Active
Viewed 1,007 times
1 Answers
2
As answered in this SO-Question, there are several Java libraries you can easily use in Kotlin:
- Guava (https://github.com/google/guava)
- Dexx (https://github.com/andrewoma/dexx)
- Eclipse Collections (formerly GS-Collections, https://www.eclipse.org/collections/)
- PCollections (http://pcollections.org/)
The most interesting thing: Kotlin has its own solution, which can be found here: https://github.com/Kotlin/kotlinx.collections.immutable (based on PCollections).
s1m0nw1
- 76,759
- 17
- 167
- 196
-
What about Javascript? Which of these libraries can compile to Javascript? – dilvan Sep 21 '17 at 11:45
-
The Kotlin official solution, as found in the github repo – The Javatar Sep 21 '17 at 13:55
-
I didn't get it. What is the "official solution"? Can you share a link to it? – dilvan Sep 21 '17 at 19:02