Lisp and Scheme
The Lisp language (1958) never had a built-in Boolean data type. Instead, conditional constructs like cond assume that the logical value "false" is represented by the empty list , which is defined to be the same as the special atom nil or NIL; whereas any other s-expression is interpreted as "true". For convenience, most modern dialects of Lisp predefine the atom t to have value t, so that one can use t as a mnemonic notation for "true".
This approach ("any value can be used as a Boolean value") was retained in most Lisp dialects (Common Lisp, Scheme, Emacs Lisp), and similar models were adopted by many scripting languages, even ones that do have a distinct Boolean type or Boolean values; although which values are interpreted as "false" and which are "true" vary from language to language. In Scheme, for example, the "false" value is an atom distinct from the empty list, so the latter is interpreted as "true".
Read more about this topic: Boolean Data Type
Famous quotes containing the words lisp and/or scheme:
“Taught me my alphabet to say,
To lisp my very earliest word,”
—Edgar Allan Poe (18091849)
“The real security of Christianity is to be found in its benevolent morality, in its exquisite adaptation to the human heart, in the facility with which its scheme accommodates itself to the capacity of every human intellect, in the consolation which it bears to the house of mourning, in the light with which it brightens the great mystery of the grave.”
—Thomas Babington Macaulay (18001859)