Typed Programming

A programming language is “typed” if, for one type of data, functions or calculations cannot be performed by another type of data, hence the meaning “type” from data-type rather than type in the written/keyboard sense. For example, “abracadabra” is a string of text and it would not make any logical sense to, say, divide this by the number 42 as the result would be meaningless.

In a “typed” programming language there are degrees of typing; from weak to strong depending on if they allow one type of data to be treated as another. Therefore in a “strongly typed” programming language (e.g. Ada) this function would not be allowed and would raise an error. In “untyped” or “weakly typed” programming languages (e.g. C++) the function would be allowed and a result would be provided, which can lead to errors and bugs.