# kotlin/kotlinx.collections.immutable

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/kotlin-kotlinx-collections-immutable).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

1,409 stars · 68 forks · Kotlin · Apache-2.0

## Links

- GitHub: https://github.com/Kotlin/kotlinx.collections.immutable
- awesome-repositories: https://awesome-repositories.com/repository/kotlin-kotlinx-collections-immutable.md

## Topics

`collections` `immutable` `immutable-collections` `kotlin`

## Description

Kotlinx.collections.immutable is a persistent data structure library for Kotlin that provides immutable lists, sets, and maps for state management. It enforces strict immutability by exposing read-only interfaces that block unauthorized modifications at compile time, while persistent structural sharing allows modified copies to efficiently reuse underlying memory storage with the original collection. 

Multiple insertions and removals can be batched through temporary mutable builder interfaces to instantly produce new persistent collections without intermediate allocations. Additionally, standard collections are transformed into immutable variants through zero-copy conversion by reusing existing underlying instances that already match the target type.

## Tags

### Part of an Awesome List

- [Immutable Data Structures](https://awesome-repositories.com/f/awesome-lists/devtools/immutable-data-structures.md) — Shares data safely across application components using persistent structures that prevent in-place modification and guarantee predictable state. ([source](https://github.com/kotlin/kotlinx.collections.immutable#readme))
- [Kotlin Immutable Collection Libraries](https://awesome-repositories.com/f/awesome-lists/devtools/kotlin-libraries/kotlin-immutable-collection-libraries.md) — Provides persistent, read-only lists, sets, and maps for safe state management in Kotlin applications.

### Data & Databases

- [Kotlin Immutability Extensions](https://awesome-repositories.com/f/data-databases/data-collections-datasets/immutable-sets/kotlin-immutability-extensions.md) — Enforces strict immutability across lists, sets, and maps in Kotlin applications to prevent unauthorized modifications.
- [Collection Builders](https://awesome-repositories.com/f/data-databases/data-insertion-interfaces/batch-insertion-interfaces/collection-builders.md) — Batches multiple insertions and removals through temporary mutable builder interfaces to instantly produce new persistent collections. ([source](https://github.com/kotlin/kotlinx.collections.immutable#readme))
- [Bulk Mutable Builders](https://awesome-repositories.com/f/data-databases/data-type-managers/mutable-types/mutability-modifiers/bulk-mutable-builders.md) — Batches multiple insertions and removals through temporary mutable builder interfaces to instantly produce new persistent collections without intermediate allocations.
- [Persistent Structural Memory Sharing](https://awesome-repositories.com/f/data-databases/persistent-storage-management/persistent-structural-memory-sharing.md) — Creates modified copies of persistent data structures efficiently by sharing underlying memory storage with the original collection. ([source](https://github.com/kotlin/kotlinx.collections.immutable#readme))
- [Application State Management](https://awesome-repositories.com/f/data-databases/application-state-management.md) — Shares data safely across application components using persistent structures that guarantee predictable state.
- [Immutability Converters](https://awesome-repositories.com/f/data-databases/immutability-converters.md) — Transforms standard read-only or mutable collections into immutable variants while reusing existing instances. ([source](https://github.com/kotlin/kotlinx.collections.immutable#readme))
- [Kotlin](https://awesome-repositories.com/f/data-databases/state-management-libraries/kotlin.md) — Maintains predictable application state through immutable and thread-safe collection structures.

### Programming Languages & Runtimes

- [Type-Safe Immutability Enforcements](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/language-features/language-extensions/union-types/type-safe-variants/type-safe-data-structures/immutable-type-modeling/type-safe-immutability-enforcements.md) — Enforces strict immutability across lists, sets, and maps by exposing read-only interfaces that block unauthorized modifications at compile time.
- [Persistent Data Structures](https://awesome-repositories.com/f/programming-languages-runtimes/persistent-data-structures.md) — Enables memory-efficient data sharing by reusing underlying storage across modified copies of collection structures.
- [Structural Sharing](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-structures/hierarchical-tree-structures/structural-sharing.md) — Reuses unchanged underlying structural nodes efficiently between modified copies of persistent data collections.
- [Memory Efficiency Strategies](https://awesome-repositories.com/f/programming-languages-runtimes/memory-efficient-runtimes/memory-efficiency-strategies.md) — Creates modified copies of persistent data structures efficiently by sharing underlying memory storage with the original collection.
- [Zero-Copy Type Conversions](https://awesome-repositories.com/f/programming-languages-runtimes/zero-copy-type-conversions.md) — Transforms standard collections into immutable variants through zero-copy conversion by reusing existing underlying instances.

### Software Engineering & Architecture

- [Immutable Collection Protections](https://awesome-repositories.com/f/software-engineering-architecture/read-only-buffer-pooling/read-only-state-protections/immutable-collection-protections.md) — Enforces strict immutability across lists, sets, and maps by exposing read-only interfaces that block unauthorized modifications. ([source](https://github.com/kotlin/kotlinx.collections.immutable#readme))
