HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
MagicStack
immutables
C2018–2026
MagicStack / immutables

immutables

A high-performance immutable mapping type for Python.

4Distinct people
4Mentions
0Explicit recommenders
1.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A high-performance immutable mapping type for Python.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year4 dated mentions

Observed mentions: 2018-04-02 16:09:59 UTC to 2026-08-29 20:09:47 UTC.

0122018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC220
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC000
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

What Hacker News says

4 sources
It's not exposed for general use (yet?) but cpython does internally contain an implementation of the HAMT data structure: https://github.com/python/cpython/blob/main/Python/hamt.c Set/Delete/Lookup are all O(log(n)) See also: https://github.com/MagicStack/immutables (for something you can actually use) p.s. I think the reason heapq isn't a type is that it's ancient code that's hung around from the early days of python.
In Time complexity of operations on Python's built-in types
Wow: C++ > Garbage collection was never added into C++. Manual memory management is extremely error prone. C++ has memory management simplification: reference couting via shared_ptr/unique_ptr. The trade-offs are different, but in C++ manually managing memory is not necessary unless you have a good reason. > C++ is notorious for its slow compilation time. Significantly slower than Java, not as bad as Scala. That depends on what you use and how you use it. However, this is tricky to figure out what slows down the compilation. > In C++, all references are nullable. Looks like this guy really needs to read up on C++. References can point to null, but not so easily. I think he means pointers. > Catching/throwing errors is the preferred error handling mechanism. I think he should really watch Herb Sutters Video[see 1] on the improvements of ex
Read the rest
ception handling that are in the pipeline. Herb also discusses the alternatives to exception handling. C# > Multi-paradigm? C# has Pattern matching since 8.0 [see 2] Python > Python is dynamically typed, there’s not much more to say about the type system. Dynamically but strongly typed one could say. > In comparison, NPM in JavaScript is the only tool you’ll ever need. JS has Yarn as well... > I don’t recommend using Python for large projects, the language was not built with serious software engineering in mind. no arguments provided... and in fact there are very large python projects out there in the wild. Also, pytest is one of the best test frameworks that i have seen. Rust > Rust was designed from the ground up to be fast. Compilation of Rust programs takes longer than compilation of Go programs. i don't understand why he bashes C++ for slow compilation times and not rust. According to [see 3] rust is twice as slow on some benchmarks... > Rust is the only modern language on our list with no garbage collection. > This forces the developers to think about low-level memory management, and makes developer productivity suffer. No mention of the borrow checker etc, I find extremely disappointing. > Rust has no built-in support for immutable data structures. Discussions like [4] should be referenced - i think when discussing this topic. JS > JavaScript has good libraries for working with immutable data (like Rambda/Immutable.js). Weird that he doesn't mention the library efforts in C++ [5] and Rust [6] and Python for immutable data-structures [7][8] ---- [1] CppCon 2019: Herb Sutter “De-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable” https://www.youtube.com/watch?v=ARYP83yNAWk [2] https://docs.microsoft.com/en-us/archive/msdn-magazine/2019/... [3] https://users.rust-lang.org/t/are-there-any-compilation-time... [4] https://users.rust-lang.org/t/persistent-data-structure-supp... [5] https://github.com/arximboldi/immer [6] https://github.com/orium/rpds [7] https://github.com/MagicStack/immutables [8] https://github.com/tobgu/pyrsistent
In These Modern Programming Languages Will Make You Suffer

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.