3 ms·
This is indeed a problem for Wasm/JS integration. The JS WeakRef proposal[1] will address it for many use cases, and the WebAssembly GC proposal[2], combined wi
by tschneidereit 8y ago
This is indeed a problem for Wasm/JS integration. The JS WeakRef proposal[1] will address it for many use cases, and the WebAssembly GC proposal[2], combined with JS Typed Objects[3] will address many others. Even before those features will be available, I'd expect the community to iterate on patterns to make APIs nicer.
[1] https://github.com/tc39/proposal-weakrefs https://github.com/tc39/proposal-weakrefs
[2] https://github.com/WebAssembly/meetings/blob/master/2018/presentations/2018-04-rossberg-gc.pdf https://github.com/WebAssembly/meetings/blob/master/2018/pre...
[3] https://github.com/tschneidereit/typed-objects-explainer https://github.com/tschneidereit/typed-objects-explainer