Pascal, Ada, and Haskell
The Pascal language (1978) introduced the concept of programmer-defined enumerated types. A built-in Boolean
data type was then provided as a predefined enumerated type with values FALSE
and TRUE
. By definition, all comparisons, logical operations, and conditional statements applied to and/or yielded Boolean
values. Otherwise, the Boolean
type had all the facilities which were available for enumerated types in general — such as ordering and use as indices. On the other hand, the conversion between Boolean
s and integers (or any other types) still required explicit tests or function calls, as in ALGOL 60. This approach ("Boolean is an enumerated type") was adopted by most later languages which had enumerated types, such as Modula, Ada and Haskell.
Read more about this topic: Boolean Data Type