Hacker News new | ask | show | jobs
by rpowers 1042 days 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.
1 comments

This 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.

Can 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

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.