Hacker News new | ask | show | jobs
by ujki1 2220 days ago
If the original developer didn't care if the variable will be reassigned, in which situations can it be useful to know of that intent?

>The problem with these arguments is that they tend to fall short of justifying how constraining developers in this way and doing so by default, adds value to either the code or the development process.

If the developer doesn't need to browse through the code to see if the variable is reassigned, it saves time.

I think 'Uncaught TypeError: Assignment to constant variable' should be trivial to avoid since lint-like tools warn of it before the code is executed.