Gradual typing

Gradual typing is a type system that allows for both static typing and dynamic typing but enforces types at runtime. Gradual typing allows software developers to choose either type paradigm as appropriate, from within a single language.

In many cases gradual typing is added to an existing dynamic language, creating a derived language allowing for, but not requiring, static typing to be used. In some cases, a language uses gradual typing from the start. However, there are performance and implementation complexity tradeoffs compared to dynamic or optional typing.