ballercat / walt

:zap: Walt is a JavaScript-like syntax for WebAssembly text format :zap:
https://ballercat.github.io/walt/
MIT License
4.64k stars 122 forks source link

This looks like TypeScript, how compatible is it? #167

Closed danwdart closed 5 years ago

danwdart commented 5 years ago

How compatible is Walt to TypeScript? Is it exactly the same and is just a TypeScript to wasm compiler, or is it mostly compatible? Has it been explained? Would it be worth making it so in future to prevent having to learn new things for an existing typescript dev?

ballercat commented 5 years ago

I have not looked into it and I would bet it's not at all.

Compatibility with TypeScript or some other compile to JS lang is a non-goal. Maintaining this sort of compatibility will lead down the path or re-implementing efforts of the TypeScript team and JavaScript engines tbh.

This isn't explained well but has been brought up in the past. It'll be explicitly addressed in the ongoing documentation efforts.

Personally, I would encourage developers wanting to write TypeScript to continue to do so and compile it to JS. If you are interested in compiling TypeScript to WASM then I would encourage you to checkout the AssemblyScript project. IIRC compatiblity with the TypeScript lang is a goal of that project and they spend effort to port the existing features as much as possible.

danwdart commented 5 years ago

OK great, thanks for explaining.

ballercat commented 5 years ago

No worries, thanks for stopping by!