Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Using – JavaScript (developer.mozilla.org)
2 points by andrewaylett 3 months ago | hide | past | favorite | 1 comment


TC39 level three, and I don't follow TC39 that closely but it seems to be available everywhere except Safari and I'd not seen it yet.

I'm not entirely sure whether I like it — I probably need to try using it for a bit (pun obviously intended) before making my mind up. Making it a variable declaration style rather than explicit syntax (like Java's try-with-resources) makes me slightly uneasy, as it's a change in semantics from "normal" declarations. It's not like Rust or C++ where we expect destructors to be called at the end of the scope, and it feels like it's going to be hard to work out where a variable marked "const" should have been marked "using".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: