3 ms·
tl;dr I wanted Clojure's simplicity with Lodash's flexibility, something easier to integrate into existing projects than ImmutableJS or Mori. Function bind syn
by codecurve 10y ago
tl;dr I wanted Clojure's simplicity with Lodash's flexibility, something easier to integrate into existing projects than ImmutableJS or Mori.
Function bind syntax will be controversial, so I've also included a compatibility interface, so you can use Zaphod from Babel-free JavaScript (https://zaphod.surge.sh/compat/ https://zaphod.surge.sh/compat/)
- k__ 10y agoDoesn't Ramda create new entities instead of modifying existing ones?
- codecurve 10y agoYeah, so do lodash/fp and a handful of other solid libraries. The difference is that this sticks as close as possible to Clojure's API _for data_, rather than trying to be a functional programming utility belt.
- k__ 10y agoReally? I had a few problems using lodash with Redux, because it mutated my objects.
- jdd 10y agoYou might dig lodash-bound – Enables chained lodash functions with ES bind (::) syntax https://github.com/elado/lodash-bound https://github.com/elado/lodash-bound
- k__ 10y agoYes, the whole :: syntax sounded nice and I used it quite a while last year, but it don't believe it gets approved anymore. It's stage 0 for over a year now and nothing happend.
- zaphar 10y agoAs some feedback on the site's wording. It wasn't immediately clear to me that this was a javascript library that ported Clojures immutable API's. I initially thought it was support in Clojure for Javascript data structures. I had to see the code samples before I realized.