ColinEberhardt / wasmweekly

Website for the WebAssembly weekly newsletter
http://wasmweekly.news/
Creative Commons Zero v1.0 Universal
74 stars 11 forks source link

Whereas AssemblyScript is a designed to be a very close relative to TypeScript #47

Closed loxcel closed 3 years ago

loxcel commented 3 years ago

A common misunderstanding. It's like saying JavaScript is "Java in a browser". They share a syntax, but little else.

AssemblyScript superfically resembles Javascript + types but only at the syntatic level. AS is an entirely different beast. Once you've stripped out Javascript's runtime and its many idiosyncrasies -- which are also part of Typescript -- sure you get something resembling AssemblyScript -- but you also get something resembling Java, C++ or C#.

It's impossible to take a subset of Typescript (as AssemblyScript's authors originally claimed) and compile it to target WASM. I think the AssemblyScript authors walked back that claim a while ago.

AssemblyScript is a great product; but it's its own language. Its documentation is excellent. It's also a great option for those not comfortable with C / C++ and Clang whose WASM-specific documentation is haphazard at best.