Trade-offs in designing a new JavaScript type system
Elixir type-system developer José Valim says unsupported JavaScript idioms could require new theory, reduced compatibility or dynamic typing.
TLDR
José Valim, who helped develop Elixir’s type system, says a new JavaScript type system might struggle to express every idiom precisely. For unsupported idioms, he outlines three choices: develop and prove new theory, reject them at a cost to compatibility, or fall back to dynamic typing. The fallback can limit further static checks, risk runtime mismatches or require runtime checks that may affect performance. He adds that Elixir’s strong-arrows approach may not suit JavaScript.
Combined views
65
1 Source, first seen ago