Dynamic Typing and Subtype Inference

  • Alexander Aiken ,
  • Manuel Fahndrich

Proceedings of the 1995 Conference on Functional Programming Languages and Computer Architecture |

Dynamic typing is a program analysis targeted at removing runtime tagging and untagging operations from programs written in dynamically typed languages. This paper compares dynamic typing with a subtyping system based on set constraints. The purpose is both to make precise the relationship between two superficially unrelated type systems and to illustrate how the advantages of dynamic typing and subtype inference can be combined. The central result is a theorem showing that a typing discipline at least as powerful as dynamic typing can be expressed using set constraints.