Commit 37e95b0a authored by Tim McNamara's avatar Tim McNamara

Add multi-valued-logic.md

parent 2942d3eb
In Rust, it's pretty easy to create a logical type that can encode "unknown" or
"indeterminate" system.
```
type TernaryLogic = Option(bool);
```
This approach is also available in Go and other languages with pointers:
```
*bool
```
When de-referencing the pointer, `nil` equals unknown and `true`/`false` are represented.
I'm not actually sure how the compiler can distinguish between a null pointer
and false. Something more to learn, I guess.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment