Immutable persistent collections for Kotlin
1.4k
Stars
70
Forks
44
Open issues
26
Contributors
AI Analysis
Immutable persistent collections library for Kotlin, providing interfaces and implementations for ImmutableList, ImmutableSet, ImmutableMap and their persistent variants with structural sharing. Designed for Kotlin developers building applications requiring immutable data structures across JVM, JavaScript, WebAssembly, and Native platforms; not a general-purpose collections replacement but a specialized tool for functional programming patterns and state management.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
JetBrains-backed Kotlin persistent collections library with stable API but limited ecosystem adoption
kotlinx.collections.immutable is an officially supported JetBrains library providing persistent and immutable collection abstractions for Kotlin across multiple platforms (JVM, JS, WASM, Native). It solves the structural sharing and efficient copying problem for functional-style Kotlin code. Adoption is concentrated within the Kotlin ecosystem rather than mainstream; appears used primarily by teams building reactive systems, functional code patterns, and multiplatform Kotlin applications. The library remains experimental despite years of development, signaling JetBrains' cautious approach to API stability.
Created in 2016 during early Kotlin ecosystem standardization. Positioned as an official kotlinx library to provide functional programming primitives. Has remained relatively stable in scope and API surface, suggesting the problem domain is well-understood but not a top priority for aggressive expansion.
Star growth is flat (0 gained in last 7 days as of July 2026). The project has maintained steady but slow adoption since creation — 1,410 stars over 10 years indicates niche rather than explosive uptake. Last commit on 2026-07-01 shows active maintenance. Appears growth-constrained by: (1) experimental stability badge limiting production adoption, (2) Kotlin's own market share in broader development, (3) functional programming patterns still not dominant in mainstream JVM tooling.
Adoption not verified. No case studies, known production deployments, or enterprise adoption mentioned in README. Library is published to Maven Central and has a Slack channel, indicating some community exists, but scale unknown. Comparison to immutable-js (33k stars, TypeScript) and eclipse-collections (2.6k stars, Java) shows significantly lower visibility. The experimental API stability badge likely deters production adoption despite JetBrains backing.
Based on README, the library provides interface hierarchies (ImmutableCollection, PersistentCollection, PersistentList, PersistentSet, PersistentMap) with builder patterns for mutations. Likely uses structural sharing under the hood to enable efficient persistent operations. Appears to support both insertion-order-preserving and unordered variants. No details in README about underlying data structures (e.g., hash tries, linked lists), so implementation quality cannot be verified from available metadata.
Not documented in README. Build status badge indicates TeamCity CI is active, suggesting automated testing exists, but coverage metrics not disclosed.
Last push 2026-07-01 (same day as analysis date) shows active maintenance. Badge shows official JetBrains project status. Dependency on Kotlin 2.3.0+ (recent) indicates tracking current language versions. No indicators of neglect, but slow velocity and experimental badge suggest lower organizational priority than core Kotlin projects.
ADOPT IF: you are building multiplatform Kotlin applications that need persistent collections with structural sharing, are comfortable with experimental APIs, and can tolerate the current feature set. AVOID IF: you require production-grade API stability guarantees, need the largest ecosystem of immutable collection variants, or are not committed to Kotlin as a primary language. MONITOR IF: you're evaluating Kotlin for functional programming patterns and want to see when the experimental badge is removed — that signals readiness for production use.
Independent dimensions
Mainstream potential
3/10
Technical importance
7/10
Adoption evidence
2/10
- Experimental stability badge may never be removed, keeping library in permanent pre-release status and limiting adoption in risk-averse organizations.
- Slow star growth (flat over last 7 days, 1.4k total after 10 years) suggests limited ecosystem pull; teams may default to stdlib collections or JVM alternatives.
- API changes remain possible; migration costs in large codebases could be high if design decisions are revisited.
- Adoption not publicly documented; difficult to gauge whether library is actually used in production or remains academic.
- Multiplatform support (JS, WASM, Native) adds implementation complexity; bugs or performance issues on less-tested targets may emerge.
Library will likely remain a specialized, officially-maintained tool for Kotlin functional programming rather than a mainstream dependency. If Kotlin gains significant market share, adoption may grow; otherwise, it remains a niche offering. Experimental status may persist indefinitely as a deliberate signal that API is 'stable enough for most but subject to refinement.'
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- Kotlin
- License
- Apache-2.0
- Last updated
- 2d ago
- Created
- 123mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
Enable the Power Assert plugin in tests after updating to Kotlin 2.4.20
Benchmark against other immutable collection libraries
Kotlin Collection Literals
Add getOrPut equivilant to PersistentMap
Document performance/memory behaviour for PersistentX.Builder
Top contributors
Similar repos
immutable-js/immutable-js
Immutable.js provides a collection of persistent immutable data structures...
eclipse-collections/eclipse-collections
Eclipse Collections is a comprehensive Java collections framework offering...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
1.4k | — | Kotlin | 8/10 | 2d ago |
|
|
33.1k | — | TypeScript | 8/10 | 24h ago |
|
|
2.6k | — | Java | 8/10 | 6d ago |
|
|
3.6k | — | Java | 8/10 | 1w ago |
|
|
1.1k | — | Kotlin | 8/10 | 2d ago |
|
|
1.5k | — | Kotlin | 7/10 | 4d ago |
JavaScript-focused, 23x more stars, mature API; kotlinx.collections serves Kotlin specifically and multiplatform targets immutable-js doesn't cover.
Java-focused, 1.8x more stars, production-grade stability; kotlinx.collections targets Kotlin language idioms and multiplatform (JS, WASM, Native) eclipse-collections does not.
Standard library is built-in and familiar; kotlinx.collections provides structural sharing and persistent operations stdlib lacks, but requires explicit opt-in.
Similar star count (1.1k); both are official Kotlin library experiments; atomicfu addresses concurrent programming while this addresses functional data structures.
Functional programming library for Java/Kotlin; broader scope but less Kotlin-native; adoption appears stronger but serves different use cases.