Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've been doing FP in JavaScript fulltime for a few years now. I find it much easier than the OOP approach.

My advice to the author is: choose ImmutableJS, Ramda, OR lodash. Don't choose all three.

I think that is his anti-pattern.

> I could be more productive if I didn’t have to wonder things like ... “Should I mutate this variable?”

If you're doing FP the answer is likely 'No.'



Agree with this one. Reading article i though "Why don't you just drop ImmutableJS in favor of pure js collections with lodash/fp?". I felt the same when were using ImmutableJS. Two collection libraries across the app is very inconvenient. One could build entire infrastructure with ImmutableJS and restrict native collections to only system boundaries, but in js you usually befriend a lot of libs which makes it complex.


Or?

Ramda doesn't even have the same functionality as Lodash.


Excuse the overstatement -- there are sane ways to use the libraries in the same project. The point was the 3 libraries all prescribe a certain model of structuring and operating on data. One cannot reasonably expect to use all 3 without some cognitive overhead.


I see.

I was just reminded of last week, when I needed a utils lib. I read many good things about Ramda, but then I wanted to debounce a function and it failed me, haha.


There is however enough overlap that using both ends up being a mess.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: