(we) encounter quite a lot of accidental complexity when using functional programming techniques in Javascript and presents Clojurescript as a language in which you do not encounter them because of the way the language is designed.
Thanks for your response.
Alex Dixon
62

I definitely agree with you there, that [insert language here] has its limitations and doing things a specific way is easier in [insert a different language here]. That’s why I favor JS over PHP for server-side work; some languages feel better to me than others for specific tasks.

It is your second point that I do not agree with, at least to the extent that you make it. Clojurescript might let me code in a purely functional way but it doesn’t let me code in the same language the rest of my stack, or the stacks my applications interface with, is coded in.

So while Clojurescript might be the end-all, be-all of purely FP languages for the browser, I find having to jump from one language to the next far outweighs the cost of importing Ramda and doing things the Ramda way inside of JS.

So the ‘accidental complexity’ that you claim is causing you to jump from JS to CJS in order to get purely functional is the same reason I am disagreeing with you and staying with JS for the time being, even when I want to code in a purely functional way. And with JS, I get the added benefit of being able to be almost kinda functional when I need to, without having to switch languages or even files.

Show your support

Clapping shows how much you appreciated Tim Roberts’s story.