alan icon indicating copy to clipboard operation
alan copied to clipboard

Add a Typescript compiler target

Open dfellis opened this issue 4 years ago • 0 comments

That can generate more idiomatic code. Two issues with the current Javascript generation are the complete stripping of type information and the generated code looking nothing like the original code.

It should be possible to transpile Alan to Typescript and generate code that looks closer to handwritten. Since Alan allows defining your own operators this would require creating a "blessed" list of operators that have identical behavior between Alan and Typescript, converting other uses back into function calls, but it should be doable with enough effort.

dfellis avatar Aug 19 '20 16:08 dfellis