|
|
|
|
|
by patricksli
3294 days ago
|
|
Optional typing is the general term for such type systems. "Gradual typing" was coined originally in a paper by Jeremy Siek and refers to a specific set of axioms that must be satisfied. Thank you for the link though. I will see how the term is used colloquially nowadays. |
|
There seems to be a lot of variance in what people mean by gradual/optional typing.
For example, Pyret (a language I work on) has both typed and untyped semantics. In both semantics, bindings can be optionally annotated with a type, and any Pyret program can be executed with dynamic type checking, or can be first statically type checked before executing (but doing so does not remove the dynamic checks). What should this be called? The practical effect is much the same: users can gradually add type annotations.
On the other hand, it's a far simpler approach than typed racket or reticulated python. We made the conscious decision only to include language features for which we had a static type-checking story for, wrote the compiler as if there was no static type checking, and then wrote a type inferencer/checker for the language which can be optionally enabled.