3 ms·
I you are into immutable and c++ you should really have a look at Immer by Arximboldi (who is a user here on HN). Really amazing stuff: https://github.com/arxim
by bjoli 9y ago
I you are into immutable and c++ you should really have a look at Immer by Arximboldi (who is a user here on HN). Really amazing stuff: https://github.com/arximboldi/immer https://github.com/arximboldi/immer
- m0meni 9y agoThe other immer[0] of note is a JS library that gives you immutability with a mutable API i.e. you mutate your code as normal, but all changes are proxied to a copy, which is then returned as a result of your mutations. [0]: https://github.com/mweststrate/immer https://github.com/mweststrate/immer
- cryptonector 9y agoSounds a lot like jq's jv API: https://github.com/stedolan/jq/wiki/C-API:-jv https://github.com/stedolan/jq/wiki/C-API:-jv
- widdershins 9y agoYeah I've been using this to make a interpreted Clojure-style lisp with immutable data structures. Great library.
- arximboldi 9y agoThanks for mentioning Immer! I am studying Immutable-RS right now and it seems interesting. The code is much more straight-forward than Immer's thanks to Rust expresivity when it comes to sum types, etc. Sadly, on the other hand, some of the tricks that Immer implemented, in particular the ones that flattens leaf nodes, can not be implemented in safe Rust, and I my guess is that Immer is at the moment more efficient both in run time and space usage. I would love to see some benchmarks comparing both though!