I was researching on statically typed and dynamically typed concepts and found out there is another type system called gradually typed.
Gradual typing is a type system in which variables may be typed either at compile-time (static typing) or at run-time (dynamic typing), allowing software developers to choose either type paradigm as appropriate, from within a single language.
In particular, gradual typing uses a special type named dynamic to represent statically-unknown types and gradual typing replaces the notion of type equality with a new relation called consistency (aka. compatibility) that relates the dynamic type to every other type. The consistency relation is symmetric but not transitive
Mixing static and dynamic typing is still very much an open research issue with several competing approaches, including but not limited to Jeremy Siek's Gradual Typing (which you mentioned), Quasi-Static Typing, Soft Typing, Hybrid Typing (Flanagan), Optional Static Typing (championed for example by Gilad Bracha), Blame Calculus (Wadler and Findler), Coercion Calculus (Henglein), Contracts (Findler and Felleisen), Manifest Contracts (Greenberg, Pierce, and Weirich) and many more.
Actually, the ECMAScript committee tried to do cutting-edge research by mixing static and dynamic typing in ECMAScript 4 and that was a spectacular failure.
(1 & 2) + 3would concatenate "1" and "2" as strings, and then add the result as a number to 3, thus yielding 15. In a strongly-dynamically-typed language like Python, using the "+" operator on two numbers will add then, using it on two strings will concatenate them, and using it on one of each is an error. — Sep 28, 2014 at 22:55
12+34yields 46. — Sep 28, 2014 at 22:58
External links referenced by this document: