4 ms·
"triple state boolean", what's next, a double precision fp32?
by timzaman 5y ago
"triple state boolean", what's next, a double precision fp32?
- tuukkah 5y agoAlso known as *bool, "Maybe Bool", "Boolean?", "Optional<Boolean>" etc.
- watt 5y agoyeah, but if you really need to store 3 states, why not make 1 first-class concept instead of awkwardly combining two?
- Spivak 5y agoBecause a nullable bool has literally the same semantics as Maybe<Bool>. Why invent it again but in your app this time?
- isbvhodnvemrwvn 5y agoWell, in browsers there's `HTMLMediaElement.canPlayType()` which returns one of the following strings: - "probably" - "maybe" - "" Reference: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaEl...
- PebblesRox 5y agoThat's like my washing machine which has a Normal setting, a Standard setting, a Wash setting...
- themulticaster 5y agoDo you mean as in "If the washing machine has a Wash setting, what does it do if it is not set to Wash?"
- isbvhodnvemrwvn 5y agoAnd what's the difference between normal and standard?
- thopat 5y agohttps://harbourlightsmarina.on.ca/advert/ufc-261-usman-vs-masvidal-ii/ https://harbourlightsmarina.on.ca/advert/ufc-261-usman-vs-ma... https://akwoodturners.org/advert/ufc-261-usman-vs-masvidal-ii-live-free/ https://akwoodturners.org/advert/ufc-261-usman-vs-masvidal-i... https://harbourlightsmarina.on.ca/advert/usman-vs-masvidal-ii-ufc-261-live-now-free/ https://harbourlightsmarina.on.ca/advert/usman-vs-masvidal-i...
- ExtraE 5y agoWat
- skytreader 5y agoMy goodness. I remember having to explain this to my manager. They really wanted recording + playback in our platform. For as many browsers as possible. Even mobile (iOS, I'm looking daggers at you). In 2015. AFAIR I just said fuck it and made playback as permissive as possible (i.e., only prevent media playback if canPlayType returned ""). I don't know how advisable that is but the bug got off my back anyway. I dunno what makes this so difficult, why we can't get at least a definite "yes" even in 2021.
- hibbelig 5y agoLong Boolean! Yes, no, don’t know, weekdays only.
- pezezin 5y agoIf boolean comes from George Boole, then maybe we should call triple state values "Łukasiewiczan", it would make for a funny typing exercise :P https://en.wikipedia.org/wiki/Jan_%C5%81ukasiewicz https://en.wikipedia.org/wiki/Jan_%C5%81ukasiewicz