Re:Overview of JavaScript ES6 features
by WorldMaker on Monday October 24, 2016 @11:39AM
(#12779764)
It also doesn't help that let is 3 letters versus const is 5; programmers if anything will default to the faster to type option.
[ Parent
| on HN ]
This. I personally agree with everyone saying const > let, but I just don't find myself caring enough about it to add the inconvenience of typing 5 characters instead of 3 every time I need to create a variable.
You'd think after all these decades I'd no longer be surprised that programmers try so hard to minimize their typing, since it has no demonstrable positive impact on code quality. I guess premature optimization is in the blood of some people.
It's not about working hard to minimize typing, it's more about not wanting to switch from a state of little typing to a state of more typing. Also, it has nothing to do with optimization; I don't think there exists a single person who uses "let" over "const" because of performance reasons. I also don't think anyone uses "let" over "const" because they think it improves code quality.
The right path have to add more value then the path of least residence.
Re:Overview of JavaScript ES6 features
by singularity2001 on Monday October 24, 2016 @02:04PM
(#12781189)
True, which is why we drop any var/let/const for prototyping