Typing discipline: Strong

Strong typing usually means that the programming language specifies some restrictions on intermixing operations on different data types.

This is one of the most controversial terms within typing domain, as is has no commonly agreed-upon meaning and different authors use it in different contexts. Most popular definitions of this term are the following:

  • strongly typed language forbids changes of variable type during its lifetime;
  • strongly typed language performs checks for possible type errors before statement execution and guarantees some well-defined error or exception to be trown in case of an error (as opposed to just executing the statement resulting in undefined behaviour up to crash);
  • strongly typed language forbids conversions between datatypes;
  • strongly typed language allows conversions between datatypes, but requires them to be explicit;
  • strongly typed language has no language-level ways to evade type system (like giving the programmer direct access to low-level represenrtation of data);
  • strongly typed language must have a complex fine-grained type system with compound datatypes (as opposed to type systems with only a few scalar types).

Strong typing is the opposite of weak typing.

Programming languages that uses this typing discipline: