4 comments

  • naruhodo2 hours ago
    For the curious, yes they provide a garbage-collected heap [1] as well as reference counting.<p>[1] <a href="https:&#x2F;&#x2F;sinusoid.es&#x2F;immer&#x2F;memory.html#classimmer_1_1gc__heap" rel="nofollow">https:&#x2F;&#x2F;sinusoid.es&#x2F;immer&#x2F;memory.html#classimmer_1_1gc__heap</a>
  • Waterluvian2 hours 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.
    • acemarke2 hours ago
      Completely unrelated.<p>- Immer (C++) appears to be roughly equivalent to Immutable.js ( <a href="https:&#x2F;&#x2F;immutable-js.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;immutable-js.com&#x2F;</a> ): a set of specialized data structures<p>- 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<p>As far as I know, Michel Weststrate came up with the name independently (although I can&#x27;t 100% confirm that).<p>(source: I didn&#x27;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&#x27;m a secondary maintainer at this point.)
    • eru2 hours ago
      &#x27;Immer&#x27; is just German for &#x27;always&#x27; or &#x27;eternal&#x27;. 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.<p>(Of course, they might have more in common, I don&#x27;t know.)
  • gnabgib6 days ago
    Popular in:<p>2019 (102 points, 56 comments) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20947222">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20947222</a><p>2016 (144 points, 46 comments) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13049843">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13049843</a>
  • asa2 hours ago
    Good stuff. Very good stuff.