Re:I'm Switching to Python and Actually Liking It
by mananaysiempre on Wednesday July 16, 2025 @03:46PM
(#44586076)
Also true of JavaScript pre-ES5, another language that on first glance seems to only have function scope: it actually does have block scope, but only for variables introduced in `catch` blocks. AFAIU that was the standard way for a dumb transpiler to emulate `let`.
[ Parent
| on HN ]
Re:I'm Switching to Python and Actually Liking It
by SerpentJoe on Wednesday July 16, 2025 @04:41PM
(#44586584)
I wonder if that was ever popular, considering the deoptimization effects of try/catch, and given that block scope can also be managed by renaming variables.