Empty type

The standard vacuum is in Théorie of the types a type which does not comprise values.

One commonly shortens it by club-footed (of bottom standard ), the symbol (⊥) or by the approximation ASCII _|_. It is called also sometimes standard zero . It should not be confused with the type signal or the Type unit. The type signal includes/understands all the values of a system. The unit type has only one value.

One often uses the empty type in the following cases:

  • to announce that a function or a calculation diverges ; in other words, it does not turn over a result to the appealing one. That necessarily does not mean that the program does not finish; a function can finish without turning over to its appealing, or leaving by a means other than a normal return, for example via a Continuation.
  • to indicate an error; that arrives mainly in theoretical languages in which the distinctions between the errors are not important. The practical computer programming languages use a management of exceptions in the place.

In Haskell the Keyword undefined represents a calculation whose result has an empty type. To try to evaluate undefined during the execution stops the program.

See too

Source

External bond

  • Standard and Programming Languages by Benjamin Pierce (MIT Close 2002)

Random links:Tom Burke | Stra | Pulpit of botany of the university of Cambridge | Girolamo-Luigi Durazzo | Alphonse Tavan | La_corneille