3 ms·
I used Ramda for 3+ years. I like somethings but overall wouldn't pick it up again. FP in general makes it really easy for people to write inefficient passes ov
by rpowers 3y ago
I used Ramda for 3+ years. I like somethings but overall wouldn't pick it up again. FP in general makes it really easy for people to write inefficient passes over data. In addition, debugging or code reviewing ramdajs code can be painful as you often have several layers of call stack with meaningless (curryN, pipe, map, pick) functions. I say meaningless because when your whole app uses ramda, you find it very difficult to know what is being map'd or curry'd.
- kian 3y agoThis is why I prefer a self-optimizing collections library. Many of these inefficient passes can be internally re-wired when combining 'objects' which represent the functions and their rules of composition. Inline 'debug' pipeline functions are helpful for the second problem you mentioned.
- morbicer 3y agoCan you recommend such library? I had fun with Ramda but I experienced some perf hits when doing big pipe/map/reduces on large data structures
- kian 3y agohttps://rubygems.org/gems/raskell https://rubygems.org/gems/raskell does it in ruby. A similar technique would work in JavaScript, but I don't know of any other libraries that have attempted it yet.