Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Demolishun796939dThose answers sorta sound like "technical debt" is the reason. Does typescript introduce block scope? Maybe that is the answer.
Root6713039dWait until you discover ES6 “classes”
You can generally expect this from languages that lean class-oriented OOP. They also routinely feature function scope which become indistinguishable from block scopes due to the the class-orientation.
JS is an oddball since it's technically dynamic and prototypical, that has been band-aided together over 25 years. Because of this it features block, function, module and lexical scoping.
The various types and levels of scoping are worth a read, especially if you ever do FP:
halfflat226939dPython doesn't have block scope either, and it sucks there too.
Just seems crazy to me, though the "10 days was not enough time to implement it" explanation is definitely sound.