Re:Announcing TypeScript 2.0
by rbanffy on Friday September 23, 2016 @04:30AM
(#12563135)
No. Perhaps I wasn't clear.
The code running under a JIT will behave like the static typed code when the code (and data) allows it while the programmer didn't have the additional burden of doing the type analysis for the computer.
You may be confusing dynamic typing with weak types.
Also, it's perfectly fine for the JIT to generate multiple code paths that are invoked depending on runtime types even when the source code declares a single one that acts on multiple types.
The code running under a JIT will behave like the static typed code when the code (and data) allows it while the programmer didn't have the additional burden of doing the type analysis for the computer.
You may be confusing dynamic typing with weak types.
Also, it's perfectly fine for the JIT to generate multiple code paths that are invoked depending on runtime types even when the source code declares a single one that acts on multiple types.