3 ms·
Nice, although what I really would like is Typescript in V8, and like Common Lisp, Dylan, Julia,...., having the JIT being aware of type annotations. Additiona
by pjmlp 2y ago
Nice, although what I really would like is Typescript in V8, and like Common Lisp, Dylan, Julia,...., having the JIT being aware of type annotations.
Additionally having the integration of Microsoft's AOT experiments with Typescript in MakeCode.
- dhruvrajvanshi 2y agoIt would essentially involve changing the meaning of `: Type` and `as Type`. Basically, instead of ignoring type annotations at runtime, you'd have to throw when a cast fails. This would also have other implications on the language design. Checking if an expression has a certain type at runtime would mean relying less on structural types to make these checks cheap. I've been thinking about this exact language a lot recently, but it would not be the same as Typescript. A superset of JavaScript which can be statically optimized based on type information. Fwiw, I don't think Assembly script is this language either. It's a completely different language than JavaScript with a superficially similar syntax.