Moreover, designing the actual type system is at least as hard as implementing the type checker. Coming up with a static type system that is flexible/ergonomic, expressive/powerful, sound, easy to use, and also a good match for mutable state and imperative code is really, really difficult, as demonstrated by C, C++, and Java.
A flexible/ergonomic dynamic type system is trivial in comparison. Soundness is handled at runtime when the exact value of each expression is known, and ease of use is almost a given.
It's actually extremely easy, particularly if you're familiar with Prolog (the core algorithm is a couple lines in Prolog, so knowing how that works is useful for implementing it in other languages).
I suspect the lack of statically typed scripting languages is more of a historical accident than anything.
adwn|7 years ago
A flexible/ergonomic dynamic type system is trivial in comparison. Soundness is handled at runtime when the exact value of each expression is known, and ease of use is almost a given.
rurban|7 years ago
https://github.com/perl11/Bla has typically the smallest and easiest to understand type inferencer and checker.
PeCaN|7 years ago
I suspect the lack of statically typed scripting languages is more of a historical accident than anything.