In some programming languages, any expression can be evaluated in a context that expects a Boolean data type. Typically (though this varies by programming language) expressions like the number zero, the empty string, empty lists, and null are treated as false, and strings with content (like "abc"), other numbers, and objects evaluate to true. Sometimes these classes of expressions are called falsy and truthy. For example, in Lisp, nil, the empty list, is treated as false, and all other values are treated as true. In C, the number 0 or 0.0 is false, and all other values are treated as true.
In JavaScript, the empty string (""), null, undefined, NaN, +0, −0 and false[3] are sometimes called falsy (of which the complement is truthy) to distinguish between strictly type-checked and coerced Booleans (see also: JavaScript syntax#Type conversion).[4] As opposed to Python, empty containers (arrays, maps, sets) are considered truthy. Languages such as PHP also use this approach.
For example, one may use the open sets
of a topological space as intuitionistic truth values, in which case the truth value of a formula expresses where the formula holds, not whether it holds.
In realizability truth values are sets of programs, which can be understood as computational evidence of validity of a formula. For example, the truth value of the statement "for every number there is a prime larger than it" is the set of all programs that take as input a number n, and output a prime larger than n.
Even though a Heyting algebra may have many elements, this should not be understood as there being truth values that are neither true nor false, because intuitionistic logic proves ¬(p ≠ ⊤ ∧ p ≠ ¬⊥) ("it is not the case that p is neither true nor false").[5]
But even non-truth-valuational logics can associate values with logical formulae, as is done in algebraic semantics. The algebraic semantics of intuitionistic logic is given in terms of Heyting algebras, compared to Boolean algebra semantics of classical propositional calculus.