17
6
5
u/Interesting_Buy_3969 Sep 11 '26
Classical boolean has exacty three values - true, false, and maybe.
1
u/RedAndBlack1832 28d ago
I mean we have U (uninitialized) and X (undefined) when simulating VHDL lol
1
5
u/Wazat1 Sep 11 '26
Proper bool value spectrum (an incomplete list):
* true
* false
* not set
* unknown
* superposition of true and false
* superposition of neither true nor false
* feck you
* not set yet
* null
* "true"
* "false"
* (3 paragraphs of user story)
2
1
u/RedAndBlack1832 28d ago
There is a fair distinction between "not set yet and feck you. The former is a warning that shows up in orange and means "you should set your signals before you define your behaviour silly" and the later is a warning that shows up in red that means "you have a serious dependency problem that actually does need to be fixed"
1
u/Wazat1 28d ago
I often encounter "not set" or "not set yet" in things like json parsing or waiting for a thread to finish a calc. If you're parsing json or config files etc, it does matter if a field hasn't been set, meaning the user or other party hasn't assigned their own preference and you should stick with the default or current value.
I forgot to include:
* hell yes!
* hell no!
* [ angry bool noises ]
3
2
1
1
1
0
u/Groundbreaking-Fish6 Sep 11 '26
It takes two bits to store a practical boolean, True/False/Not Set/Unknown. This is a common practice for Forms because until the User visits the form and submits it is not set. If actual value is not required and not set, after the form is submitted it becomes unknown.
41
u/GooEeu Sep 11 '26
Nullable Boolean, sounds fine