JavaScript declarations in conditionals was discussed at TC39 recently, but consensus broke down over one key detail. How do you think it should behave?
22 reposts110 likes
JavaScript declarations in conditionals was discussed at TC39 recently, but consensus broke down over one key detail. How do you think it should behave?
22 reposts110 likes
Well my opinion on this is weak either way because regardless of the final convention, there are ways to write the code to make memory free when you want and they don't seem particularly burdensome. Eg. if Rust-like you could just declare the viable outside the if in a using block to keep it scoped.
The proposal is at github.com/tc39/proposa.... We plan to do text equivalents for these videos in future, but need to plan some stuff first.