3 ms·
The ability to compile C code to WASM will be invaluable for porting well-used C libraries to the web, but given that the goal of WASM is to define a ("more-or-
by kibwen 9y ago
The ability to compile C code to WASM will be invaluable for porting well-used C libraries to the web, but given that the goal of WASM is to define a ("more-or-less") language-agnostic bytecode, I see little reason why people would prefer to use C when they could continue using Javascript, or, eventually, whatever the 40-years-from-now equivalent of Python is. (Of course, you'll always be able to use C if you do want to, so it's not like it's ever going to risk vanishing.)
- krapp 9y ago> I see little reason why people would continue using C when they could continue using Javascript, or, eventually, whatever the 40-years-from-now equivalent of Python is. People will use C or Python or whatever on the web for the same reasons so many people transpile to javascript today, including that they simply don't like javascript and would rather write code in a language they prefer.
- kibwen 9y agoIndeed, but, as much as I admire Typescript, the vast majority of people aren't transpiling anything to Javascript. The grandfather comment was concerned with whether the future "C of the web" would literally be C, but I don't see how the introduction of WASM will start convincing the majority of people to start shipping webapps written in C. C is useful today as a low-level lingua franca, but on the web WASM will be the lingua franca, by definition, and C will be competing with many other languages that compile to WASM.
- krapp 9y ago> The grandfather comment was concerned with whether the future "C of the web" would literally be C, but I don't see how the introduction of WASM will start convincing the majority of people to start shipping webapps written in C. WebAssembly supports C/C++ now, and there is a lot of existing code that could be tested or convered. WebAssembly will probably get garbage collection and be able to support many other languages soon, but by then network effects may have taken over - especially if most online tutorials for WASM cover C or C++.
- adrianratnapala 9y agoIndeed there can be more than one lingua-franca, much as Fortran and Pascal shared the native machine with C. But they all have in common that they added little by way of run-time dependencies, and a web lingua franca would also need this property. But on the web, the basic "built-in" run-time is much richer than was available to those languages. It includes the DOM and many other things. JavaScript already exposes all those things, and no more, so I think it is ideally placed to become (remain) the dominant lingua franca. So even if the WASM world is multi-lingual, expect APIs to be described in JS terms, maybe with some kind of backward-compatible type decoration thrown in.