News for hackers. Stuff that matters.
Re:TypeScript 5.0 by skratlo on Thursday March 16, 2023 @02:03PM (#35185755)
We have WASM dude. But TS people are in TS bubble for what it's worth.
Re:TypeScript 5.0 by mc10 on Thursday March 16, 2023 @02:15PM (#35185952)
Until WASM can touch the DOM you’re still going to need JS (and hence, TS).
Re:TypeScript 5.0 by nicoburns on Thursday March 16, 2023 @02:40PM (#35186369)
In 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.
Re:TypeScript 5.0 by maxloh on Thursday March 16, 2023 @03:42PM (#35187268)
How does that work?
Re:TypeScript 5.0 by amaranth on Thursday March 16, 2023 @04:59PM (#35188526)
web-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/we...

Re:TypeScript 5.0 by maxloh on Friday March 17, 2023 @01:46PM (#35200353)
You 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".
Re:TypeScript 5.0 by nicoburns on Friday March 17, 2023 @09:12PM (#35205016)
When 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.
Re:TypeScript 5.0 by oaiey on Thursday March 16, 2023 @02:21PM (#35186057)
And objects. And so many more things.

Wasm is a cpu or low level operating system and not programming language

Re:TypeScript 5.0 by yCombLinks on Thursday March 16, 2023 @02:06PM (#35185805)
It's not worth anything. Are you writing raw WASM?
Re:TypeScript 5.0 by swatcoder on Thursday March 16, 2023 @02:08PM (#35185833)
WASM and TypeScript don’t really compare or compete. I’m not sure what you’re saying.