4 ms·
I think one of the reasons typescript has been able to get so good so fast as by having types _not_ control execution. Traditional type systems have a whole lo
by breatheoften 8y ago
I think one of the reasons typescript has been able to get so good so fast as by having types _not_ control execution. Traditional type systems have a whole lot of requirements that arise because of the need for types to offer the currency that drives the code generation (and optimization) processes.
I’m hoping the eventual way that typescript style typing helps with perf is by presenting new compilation modes that make it possible to detect at runtime places where the code executed (at runtime) might not be providing the performance that could be expected by the types (because of a lack of runtime deoptimization or lack of ability for runtime to specialize in the circumstances presented during the program’s execution).
I think that could be a pretty powerful way forward — and very pragmatic given that the vast majority of code in any code base doesn’t need to be particularly fast ... I think what’s needed in this domain are (1) powerful tools to help maintain correctness (2) a smooth way to find and fix performance issues where they occur — and ideally by being able to write those fixes in the same language. I think those more useful features for a web scale language than a language that bends over backward in terms of expressivity to make “everything fast” ...