|
|
|
|
|
by WorldMaker
1312 days ago
|
|
I feel like part of the issue is not as much that typechecking is slow, but that at runtime type checking "doesn't matter". I think a lot of people would like to see the Stage 1 Type Annotations proposal [1] move forward where JS would allow and ignore type annotations at runtime and even "type stripping" disappears at runtime for TS files. It doesn't matter how fast a type checker is at that point at runtime. The only reason to bring back type checking at runtime would be if V8 et al ever also started using type hints as JIT hints and you want to triple check you are sending the right type hints and not accidentally stomping on your own runtime performance. (Which is intentionally not in that Stage 1 proposal mind you: no one is expecting runtime type hints in the near future.) [1] https://github.com/tc39/proposal-type-annotations |
|