Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, great for that use-case - memory management; it's great to get the DisposeStack that allows "moving" out of the current scope too, that's handy.

I adopted it for quickjs-emscripten (my quickjs in wasm thingy for untrusted code in the browser) but found that differing implementations between the TypeScript compiler and Babel lead to it not being reliably usable for my consumers. I ended up writing this code to try to work around the polyfill issues; my compiler will use Symbol.for('Symbol.dispose'), but other compilers may choose a different symbol...

https://github.com/justjake/quickjs-emscripten/blob/aa48b619...



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

Search: