var, const, let... now ‘using’? - Inside the new dispose lifecycle introduced in a recent Stage 3 TC39 proposal

https://www.youtube.com/watch?v=VqdVaix3Zvw

20 points · 2 comments · view on lemmy.world

2 Comments

AnusBesamus@feddit.de · 6 pts · 3y

This is a really useful feature! I had a bug a few days ago where I forgot to close a DB connection and wished that something like Go's defer was a thing. Great timing!

silas@programming.dev · 3 pts · 3y

Thanks for sharing, looks awesome!