These are chat archives for ramda/ramda

15th
Apr 2016
Brad Compton (he/him)
@Bradcomp
Apr 15 2016 00:11
@GrosSacASac My preference is to avoid side effects, so personally I would go for method one. Method 2 is probably more performant, though that probably doesn't matter unless you have a rather large object.
Walle Cyril
@GrosSacASac
Apr 15 2016 15:39
it doesn't avoid side effects, it delays it. At the end I use the result to change something on the screen, method 1 or 2
My priority here is readability, not performance
Lewis
@6ewis
Apr 15 2016 17:58
@Bradcomp did you tell me that you use nodejs on the backend?
How do you like it?
Brad Compton (he/him)
@Bradcomp
Apr 15 2016 18:09

@GrosSacASac I should have been more explicit, but method 1 in the example avoids side effects, whereas method 2 relies on a side effect (assigning to an external variable) to achieve its goals.

I prefer to avoid modifying external variables from within a function (with some exceptions, like closures for private state). It works fine in small cases, but as a pattern it concerns me, as it leads to code that gets harder to reason about as your codebase grows. If you don't share my prejudices in that area, that's fine, I was just providing my reasoning for preferring method one.

6ewis @6ewis was ignored
Brad Compton (he/him)
@Bradcomp
Apr 15 2016 18:11
@6ewis I like nodejs. It gets the job done. It comes with all the benefits and drawbacks of JavaScript. The ecosystem is large, which is nice.
Lewis
@6ewis
Apr 15 2016 18:12
@Bradcomp are you productive with it? im debating between that and clojure
i heard a lot of good things about socket.io
Brad Compton (he/him)
@Bradcomp
Apr 15 2016 18:13
I am productive with it for sure. I don't have any experience with Clojure though, so I can't compare.
I find it's really easy to spin up a server and get going with a new project.
Lewis
@6ewis
Apr 15 2016 18:14
thank you. I might give it a try
@Bradcomp are you an angular or react guy?
sorry guys I know it's not the proper channel for off topic stuff