Tristate - wanna?
Timon Gehr
timon.gehr at gmx.ch
Sat Oct 26 17:08:17 PDT 2013
On 10/26/2013 05:42 PM, Andrei Alexandrescu wrote:
> While messing with std.allocator I explored the type below. I ended up
> not using it, but was surprised that implementing it was quite
> nontrivial. Should we add it to stdlib?
>
> Theory: http://en.wikipedia.org/wiki/Three-state_logic
>
"The term tri-state[1] should not be confused with ternary logic
(3-value logic)."
> ...
>
> Tristate opBinary(string s)(Tristate rhs) if (s == "&")
> {
> // & yields 0, 1, 4
> return make(value & rhs.value);
> }
>
This does not seem right. yes&unknown should be unknown.
More information about the Digitalmars-d
mailing list