3 ms·
Only touching the surface. The major problem with dynamic typing is performance. There are not many dynamic type systems added to existing languages which made
by rurban 6y ago
Only touching the surface.
The major problem with dynamic typing is performance. There are not many dynamic type systems added to existing languages which made the language faster. More secure yes. Better documentation via typed signatures yes. Better error messages. But only a few made it faster, by using the available type optimizations. Racket complained, python complained, perl5 complained, ruby complained, everybody complained. I think only PHP and my cperl gained speed with added dynamic types.
The compiler overhead adds to the runtime. With static types you don't care, your compiler and typechecker doesn't need to be Rocket science. With dynamic languages it needs to be. And your paired runtime optimizations, liked typed arrays, eliminated bounds checking, optimized int ops must be worth it. You don't need a jit with types.
"Is Sound Gradual Typing Dead?"
https://www2.ccs.neu.edu/racket/pubs/popl16-tfgnvf.pdf https://www2.ccs.neu.edu/racket/pubs/popl16-tfgnvf.pdf