Hacker News new | ask | show | jobs
by ummonk 2407 days ago
JS with React is great if you use an immutable data structures library and compose functions.
1 comments

ES6 and newer JS is a great functional language.

That said, I do not recommend immutable libraries. Here are the reasons:

1. They provide false comfort. Nothing in JS is truly immutable. People are just going to end up breaking the rules (purposely or inadvertently).

2. Boxing and unboxing regular JS objects becomes a pain in the ass and a maintenance horror show. You'll never know what an object is and you'll have to jump through countless hoops to get plain old JS objects to do anything with anyway.

Much better is to educate developers, and make sure code is properly reviewed before merging. Immutability doesn't need to be built into the language. Code customs and practices can go a long way.