|
|
|
|
|
by danbruc
20 days ago
|
|
In one respect, boolean logic is popular because of bits. If we had ternary processors, ternary logic would be more popular. Ternary truth values combines two dependent binary questions - do we know the truth value of X and what is the truth value of X. The second one is meaningless if the first one is false. You can merge the two binary values into one ternary unknown, true, and false but this does not really change much. Depending on the context one or the other might be easier to work with. Option types generalize this, there is always a binary choice between the value is known or unknown, and if it is known, then there will also be the actual value. A ternary logic value is just Maybe<Boolean>. |
|