Remix.run Logo
Immer – A library of persistent and immutable data structures written in C++(github.com)
89 points by smartmic 7 days ago | 10 comments
Waterluvian 11 hours ago | parent | next [-]

Any sense how, if at all, C++ Immer and JS Immer relate as projects? They’re basically meant to be the same thing but I haven’t found either acknowledging the other.

acemarke 10 hours ago | parent | next [-]

Completely unrelated.

- Immer (C++) appears to be roughly equivalent to Immutable.js ( https://immutable-js.com/ ): a set of specialized data structures

- Immer (JS), on the other hand, uses JS Proxies to wrap plain values, traps attempted mutations, and then replays them to return a safely immutable updated final result

As far as I know, Michel Weststrate came up with the name independently (although I can't 100% confirm that).

(source: I didn't create Immer (JS), but I started using it in Redux Toolkit in 2018, am quoted in the docs about how much I love it, spent the last couple months doing performance optimization work that got shipped in Immer 11.x, and just put up some more bugfix PRs today. I'm a secondary maintainer at this point.)

benoits 4 hours ago | parent [-]

Thanks for your work, really appreciated the RTK perf boost!

eru 10 hours ago | parent | prev [-]

'Immer' is just German for 'always' or 'eternal'. So giving that name to your library of persistent and immutable data structures is a fairly natural thing to do, without them having anything more in common than that.

(Of course, they might have more in common, I don't know.)

MeteorMarc 4 hours ago | parent [-]

Immer is also a dutch word, with the same meaning as in german.

naruhodo 11 hours ago | parent | prev | next [-]

For the curious, yes they provide a garbage-collected heap [1] as well as reference counting.

[1] https://sinusoid.es/immer/memory.html#classimmer_1_1gc__heap

gnabgib 7 days ago | parent | prev | next [-]

Popular in:

2019 (102 points, 56 comments) https://news.ycombinator.com/item?id=20947222

2016 (144 points, 46 comments) https://news.ycombinator.com/item?id=13049843

gignico 5 hours ago | parent | prev | next [-]

I used this library extensively in a prototype of a project and it was awesome!

Besides performance, the API is very well thought.

asa 11 hours ago | parent | prev | next [-]

Good stuff. Very good stuff.

nurettin 7 hours ago | parent | prev [-]

Anyone else religiously went through 490 packages in cppget to make sure they aren't missing out?