Re:JavaScript Structs
by thot_experiment on Thursday October 10, 2024 @05:43PM
(#41803886)
Sure and I'd accept the weaker claim that "there's no reason to use var in a production codebase touched by many people"
Re:JavaScript Structs
by yakshaving_jgt on Friday October 11, 2024 @04:56AM
(#41807654)
> Your code needs to be dead boring 90% of the time
I also prefer boring code, but I think having the choice between var, let, and const is less boring than only having var.
People don't really get better at handling the complexity of large code bases. We are fundamentally the same organic matter that existed prior to the first computer coming into existence. So as code bases and library bases grow larger and larger, they need to be proportionately easier to read or even ignore.
Your code needs to be dead boring 90% of the time, otherwise you're imposing on your coworkers. And using variables before they're declared is just shitty behavior.