Kotlin

Kotlin/kotlinx.collections.immutable

Kotlin Apache-2.0 Dev Tools

Immutable persistent collections for Kotlin

1.4k stars
70 forks
active
GitHub

1.4k

Stars

70

Forks

44

Open issues

26

Contributors

v0.5.1 02 Jul 2026

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.

Dev Tools Library Discovery value: 5/10
Documentation 8/10
Activity 9/10
Community 8/10
Code quality 7/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

immutable-collections kotlin-multiplatform persistent-data-structures functional-programming structural-sharing
Actively maintained Well documented Niche/specialized use case Production ready
Deep Analysis · Based on README and public signals
1w ago

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.

Origin

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.

Growth

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.

In production

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.

Code analysis
Architecture

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.

Tests

Not documented in README. Build status badge indicates TeamCity CI is active, suggesting automated testing exists, but coverage metrics not disclosed.

Maintenance

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.

Honest verdict

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

Risks
  • 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.
Prediction

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.'

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

Kotlin
99.9%
Java
0.1%

Information

Language
Kotlin
License
Apache-2.0
Last updated
2d ago
Created
123mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

immutable-js

immutable-js/immutable-js

Immutable.js provides a collection of persistent immutable data structures...

33.1k TypeScript Web Dev
eclipse-collections

eclipse-collections/eclipse-collections

Eclipse Collections is a comprehensive Java collections framework offering...

2.6k Java Dev Tools
immutables

immutables/immutables

Immutables is a Java annotation processor that automatically generates...

3.6k Java Dev Tools
Kotlin

Kotlin/kotlinx-atomicfu

AtomicFU is a Kotlin multiplatform library providing idiomatic atomic...

1.1k Kotlin Dev Tools
Kotlin

Kotlin/kotlinx-io

kotlinx-io is a multiplatform Kotlin library for basic I/O operations, built...

1.5k Kotlin Dev Tools
vs. alternatives
immutable-js

JavaScript-focused, 23x more stars, mature API; kotlinx.collections serves Kotlin specifically and multiplatform targets immutable-js doesn't cover.

eclipse-collections

Java-focused, 1.8x more stars, production-grade stability; kotlinx.collections targets Kotlin language idioms and multiplatform (JS, WASM, Native) eclipse-collections does not.

Kotlin stdlib collections

Standard library is built-in and familiar; kotlinx.collections provides structural sharing and persistent operations stdlib lacks, but requires explicit opt-in.

kotlinx-atomicfu

Similar star count (1.1k); both are official Kotlin library experiments; atomicfu addresses concurrent programming while this addresses functional data structures.

Vavr

Functional programming library for Java/Kotlin; broader scope but less Kotlin-native; adoption appears stronger but serves different use cases.