4 ms·
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 o
by Waterluvian 10mo ago
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 10mo agoCompletely unrelated. - Immer (C++) appears to be roughly equivalent to Immutable.js ( https://immutable-js.com/ 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 10mo agoThanks for your work, really appreciated the RTK perf boost!
- deleted 10mo ago[deleted]
- eru 10mo ago'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 10mo agoImmer is also a dutch word, with the same meaning as in german.
- deleted 10mo ago[deleted]
- Hendrikto 10mo agoI would never translate “eternal” to “immer”, but rather “ewig”. “Always” is the corrent translation, imo.
- eru 10mo agoSure, though 'never' is a bit of a strong statement. It depends on context and what's idiomatic. An example: DE: Er schwor, ihr auf immer treu zu sein. EN: He swore to be eternally faithful to her.
- Hendrikto 10mo agoTrue, that works, but I still think “Er schwor, ihr ewig treu zu sein.” is the more natural translation.