News for hackers. Stuff that matters.
Re:Keep your source code SIMPLE by deckard1 on Sunday November 10, 2019 @04:04PM (#21500191)
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.

There are no comments on this comment yet.