Remix.run Logo
gima a day ago

"How many options fit into a boolean?" Five or two, according* to Microsoft.

> MsoTrioState is "a tri-state Boolean value". it has five possible values. only two of them are supported.

*) https://learn.microsoft.com/en-au/dotnet/api/microsoft.offic...

Sourced from here https://fedi.lynnesbian.space/@lynnesbian/115969259564305759

xen0 7 hours ago | parent | next [-]

That is... amazing.

I think my favourite part is the fact that '1' isn't even one of the supported values.

rf15 21 hours ago | parent | prev [-]

Funnily enough that was also my first idea upon reading the headline.

So let's remember: some programmer, somewhere, is right now thinking about building a tri-state boolean because they think it fits their current problem perfectly fine. And they are always wrong.

gizmo686 21 hours ago | parent [-]

I've implemented trits a bunch of times and have never regretted it.

How you get 5 possible values into a tri state Boolean is beyond me though.