Re:John Carmack on Mutable Variables
by throwaway2037 on Monday November 03, 2025 @11:25AM
(#45800822)
> Javascript only enforces reassignments to const.
Java is the same with the keyword final. I never heard anyone complain about it. Are you asking for the special hell that is C++ const correctness?
More importantly, because working immutably in JS is not enforced, trying to use it consistently either limits which libraries you can use and/or requires you to wrap them to isolate their side effects. ImmerJS can help a lot here, since immutability is its whole jam. I’d rather work in a language where I get these basic benefits by default, though.