4 ms·
Genuinely ignorant question, what's the difference with C from this perspective? I thought the whole point of C was to be a common language.
by zimablue 8y ago
Genuinely ignorant question, what's the difference with C from this perspective? I thought the whole point of C was to be a common language.
- kodablah 8y agoNasal demons
- naasking 8y agoBinary compatibility across architectures, no undefined behaviours are the primary ones.
- quickben 8y agoYes of course, here is an example of a well defined, no ub, == overloads. https://slikts.github.io/js-equality-game/ https://slikts.github.io/js-equality-game/ It is all bound to make JS kernel programing a Pilar of OS Stability.
- kanox 8y agoDoes that apply to web assembly?
- tomjakubowski 8y agoNone of that applies to web assembly, as I'm sure you know.
- rictic 8y agoYou're confusing JS with wasm and undefined behavior with confusing behavior. JS and wasm are strongly defined and the specifications consider undefined behavior a bug.
- kettlecorn 8y agoC has to be recompiled per platform. The advantage to something like using WebAssembly is you could write a program in C, compile it to WebAssembly, and then it could be run on anything that supports WebAssembly. This could enable a future where you write one program that can run in a web browser, as a phone app, as a desktop program. All with only tweaking the UI. Additionally the divide between a “web app” and a desktop app from a user perspective increasingly comes down to: do I need this to run fast (as a native program), or do I want it to be convenient to use (as a web app)? WebAssembly may very well become fast enough that it is fast and convenient for all but the absolute most demanding of applications.
- akiselev 8y agoWebAssembly's closest analog would be LLVM's IR, which many compilers like clang (for C/C++) or rustc output so that they can use LLVM's existing codegen. In WebAsm's case, however, the backend would be the different browsers and their sandboxes. The C ABI describes a common calling convention and a few other details to allow different compilers to use each other's binaries, but C is hardly a common language in the way WebAssembly is meant to be.