News for hackers. Stuff that matters.
Re:AssemblyScript: A variant of TypeScript targeting WebAsse... by outside1234 on Saturday December 19, 2020 @11:35AM (#25478512)
Can someone explain why I would want Web Assembly versus just writing in another language?

Serious question: I feel like I am missing the use case for something like this - is it primarily useful for multi-tenant scenarios where you want to sandbox the workload or ??

Re:AssemblyScript: A variant of TypeScript targeting WebAsse... by CyberDildonics on Saturday December 19, 2020 @03:23PM (#25480849)
Webasm is something you compile to, not write in. It can be run in a web browser at near native speeds. I don't understand the rest of your question or what your question marks allude to.
Re:AssemblyScript: A variant of TypeScript targeting WebAsse... by outside1234 on Saturday December 19, 2020 @07:54PM (#25482859)
So is the use case that I want to write code for the Browser but in an alternative language (say, in Rust)?
Re:AssemblyScript: A variant of TypeScript targeting WebAsse... by DonHopkins on Saturday December 19, 2020 @11:48AM (#25478674)
It's great if you're already using TypeScript for the server and browser (non-WebAssembly) parts of your system. That way you can harmoniously share some of the same code and data structures.
Re:AssemblyScript: A variant of TypeScript targeting WebAsse... by kbumsik on Saturday December 19, 2020 @09:03PM (#25483191)
It can be used when you just want native, low-level WASM features. It is often better when you don't want complex WASM interoperability interfaces of other languages. This help your code keep clean.

Its minimal runtime can be run outside of browser easily. Even Rust requires complex interfaces, requires big runtime binaries to run on WASM, and it sometimes is not portable that it can run only on browsers.

Re:AssemblyScript: A variant of TypeScript targeting WebAsse... by jakelazaroff on Saturday December 19, 2020 @08:10PM (#25482950)
There’s another post on the front page right now about how Shopify uses wasm outside of the browser: https://news.ycombinator.com/item?id=25476605