News for hackers. Stuff that matters.
Re:Step-by-step tutorial to build a modern JavaScript stack ... by vmasto on Saturday October 29, 2016 @02:08PM (#12825378)
Nit: not sure why you mention const. It does not provide any kind of immutability assurance.
Re:Step-by-step tutorial to build a modern JavaScript stack ... by k__ on Saturday October 29, 2016 @02:19PM (#12825458)
I just use const instead of var/let all the time and it prevented me from overriding the variable later, which forced me to write my code a bit more functional then before I used it.

I know that I can still change indirect references or override valueOf() etc.

Re:Step-by-step tutorial to build a modern JavaScript stack ... by pault on Saturday October 29, 2016 @06:29PM (#12826817)
You probably know this, but for anyone else reading, the problem is that if you assign an object or array using const, the object/array members are still mutable. If you have a tree structure, you have to recursively Object.freeze the entire tree to get immutability, which AFAIK is basically what immutable.js does for you. I also use const by default, but I find that more often than not my variables are trees and lists.