18 ms·
I still dont understand: Can this be a general purpose replacement for javascript or not? Because if it is then every language, even Dart and typescript, should
by hubert123 10y ago
I still dont understand: Can this be a general purpose replacement for javascript or not? Because if it is then every language, even Dart and typescript, should switch to producing webassembly. Right?
- roryokane 10y agoNo, WebAssembly is not currently a general-purpose replacement for JavaScript. Maybe in the future it will be, but right now WebAssembly doesn’t have any APIs to access the DOM. This makes it only good for quickly doing calculations with numbers or data that can be easily represented as numbers, such as implementing a physics engine for a browser game.
- deleted 10y ago[deleted]
- bryanrasmussen 10y agoEven if WebAssembly had some API to access the DOM I have a feeling it would always be sort of the same thing as GWT - you can do stuff that touches the UI in it but probably isn't the best thing.
- ilaksh 10y agoIt doesn't have any access to any web APIs period, not just the DOM. And it doesn't make sense to use it for physics because GPUs can do that much faster (so that would be WebGL, which like everything else is JS only).