Optional typing

from Wikipedia, the free encyclopedia

Optional typing refers to a form of typing that is neither syntactically nor semantically required and therefore has no influence on the dynamic semantics of the language. In order to utilize the advantages of strong type systems , these can be integrated optionally. The integrated typifications can be used in parallel or in different forms in series. Programming languages ​​with optional typing are for example Objective-C , Strongtalk , Dart , mypy and Newspeak .

Mark

  • The most important distinguishing feature of an optional typing is that the types used in the source code of the language have no effect on the semantics at runtime.
  • Type annotations are supported but not mandatory.

Use

Type annotations enable programmers to be supported by the integrated development environment such as code completion, real-time error detection and meaningful error messages.

Web links

Individual evidence

  1. Gilad Bracha: Pluggable Type Systems (PDF; 83 kB). In: OOPSLA'04 Workshop on Revival of Dynamic Languages, October 27, 2004.
  2. mypy-lang.org : The Mypy Language Blog - Updates about mypy, a Python variant with seamless dynamic and static typing
  3. Gilad Bracha , Erik Meijer : Erik Meijer and Gilad Bracha: Dart, Monads, Continuations, and More , Channel 9 on January 9, 2013 at the GOTO 2012 Conference in Aarhus.