3 ms·
If you're working directly with the DOM or other JavaScript APIs it's still going to be a garbage-collected, object-oriented data model. The JavaScript object
by skybrian 8y ago
If you're working directly with the DOM or other JavaScript APIs it's still going to be a garbage-collected, object-oriented data model.
The JavaScript object model is likely to remain fundamental for cross-language within-browser interop, just like C api's are fundamental for foreign function calls in other environments. (Or Java API's in a JVM.)
- rickycook 8y agoi’d imagine that at its core, all the DOM access will be just another WASM call, and WASM has no concept of objects AFAIK? it would be up to each language to represent those bindings however it likes. i don’t think the functions would even have names per se; similar to minified JS you know some magic reference number but a human readable name is not relevant all assumptions here
- skybrian 8y agoIf you're willing to custom-design a new API by hand, you can do it however you like. But if you want to, say, autogenerate bindings from a typescript definition file (the defacto standard for describing Javascript API's), you're probably going to end up using or adapting their function names, type names, parameter names, and so on, or you'll confuse the developers. It can be minified if both the web assembly and foreign code pass through the same minifier, but source code still has to be readable.