3 ms·
We have WASM dude. But TS people are in TS bubble for what it's worth.
by skratlo 4y ago
We have WASM dude. But TS people are in TS bubble for what it's worth.
- yCombLinks 4y agoIt's not worth anything. Are you writing raw WASM?
- swatcoder 4y agoWASM and TypeScript don’t really compare or compete. I’m not sure what you’re saying.
- mc10 4y agoUntil WASM can touch the DOM you’re still going to need JS (and hence, TS).
- oaiey 4y agoAnd objects. And so many more things. Wasm is a cpu or low level operating system and not programming language
- nicoburns 4y agoIn fairness, rust-in-wasm has pretty complete DOM bindings. You can quite easily write DOM manipulation code in Rust without ever touching JS/TS. Whether that's a good idea is another matter.
- maxloh 4y agoHow does that work?
- amaranth 4y agoweb-sys[1] generates the binding code using the same IDL files that browsers use to generate their JS bindings to the C++ doing the actual work. [1] https://github.com/rustwasm/wasm-bindgen/tree/main/crates/web-sys https://github.com/rustwasm/wasm-bindgen/tree/main/crates/we...
- maxloh 4y agoYou still need to run JavaScript functions to manipulate the DOM. "without ever touching JS/TS" seems misleading as that implies "no JavaScript code is executed".
- nicoburns 4y agoWhen I read "touched" I don't think "executed". I think "edited". There is C code executed when I run JavaScript, but that doesn't mean that I had to touch it. Similarly, all the JS run when accessing the DOM from Rust is generated by the library. The user of the library doesn't have to touch it.