DEV Community

Discussion on: What is the 'Temporal Dead Zone' in JavaScript?

Collapse
 
deathshadow60 profile image
deathshadow60 • Edited

Honestly this is part of why I think let/const just takes something already painfully convoluted and annoying, and just makes things worse. If you need scoping beyond the function level, or have trouble maintaining declaration orders, your code is probably crap to begin with.

But what do I know? I come from a "Wirth family" language background (Ada, Pascal, Modula) so to me any language that doesn't make you use forward declaration is junk.

Let's be honest, the ONLY reason any of us actually use JS by choice is the death-grip it has on the browser, and some people's unwillingness to learn more than one language so they shoe-horn it into the server-side.

Collapse
 
ahmetkapusuz profile image
Ahmet Kapusuz

I agree that sometimes let/const makes things a little bit complicated. But it's good to solve some of weird block behavior of JavaScript, the only burden is that you have to learn how and where to use it to get this advantage.
I come from a Java background but I love coding in JavaScript. I think comparing JavaScript with other languages is an endless discussion. So, I just love good parts of the languages which I use and try to avoid bad practices as much as possible.