2 ms·
JS engines would not benefit significantly from the annotations (there may be some slight wins in code density through coalesced checks, but there would be incr
by olliej 5y ago
JS engines would not benefit significantly from the annotations (there may be some slight wins in code density through coalesced checks, but there would be increases in other data structures). Explicit types in this case are primarily a tool to make writing large scale software easier.
But ignoring the types is actually worse than “not being helpful”, as it both locks in the current syntax (unlike claims it does provide space for experimentation), and it means that engines cannot in future start enforcing the types specified with this syntax.