back

by andsoitis·4y ago·view on hn ↗
> custom compiler for a TypeScript-like language targeting WebAssembly. The reason I like AssemblyScript (or ASC for short) is because it allows the average web developer to make use of WebAssembly without having to learn a potentially new language like C++ or Rust. It’s important to note that the language is TypeScript-like. Don’t expect your existing TypeScript code to just compile out of the box. That being said, the language is intentionally mirroring the behaviors and semantics of TypeScript (and therefore JavaScript), which means that the act of “porting” TypeScript to AssemblyScript are often mostly cosmetic, usually just adding type annotations.

I haven't had the time to read more, but I'd be curious to learn why they didn't just target full TypeScript compatibility. That would reduce the barrier to entry materially.

1 comments
With TypeScript being a strict superset of JavaScript, wouldn't that entail dragging all of JavaScript semantics along?
> entail dragging all of JavaScript semantics along?

They say: "... the language is intentionally mirroring the behaviors and semantics of TypeScript (and therefore JavaScript) "

And then: "... which means that the act of “porting” TypeScript to AssemblyScript are often mostly cosmetic, usually just adding type annotations."