9

There should be a new boolean called "Not sure". I wonder how much it can change the logic of every language.

Comments
  • 5
    In some languages, there is. C# has the nullable bool type: bool?. Just for those times when you haven't opened the box to see if the cat is dead or alive.
  • 3
    You just want rock paper scissors don't you?
  • 1
    @monkeyboy
    1) null is also there in other oop languages i guess but it can be used in boolean variables as well as other data type
    2) Not sure will help in scenarios in which indecisive people are involved
    3) this post is tagged in under joke/meme category and i dont know why i typed above two points😂😂
  • 0
    @karma yeah the suspence of the climax
  • 1
    @BlackSparrow I highly suggest having fun with balanced ternary (-1, 0, 1). Besides being fun in arithmetic, it is even more fun logically because though it works well for representing (false, null, true) we haven't figured out how exactly null should work in logic. There are a few different ideas out there which mostly depend on use case and individual interpretation of the meaning of null
  • 0
    Fuzzy logic is really old news.
  • 0
    @Fast-Nop only if you already know about it.
  • 0
    @tokumei maybe -0 since -1 is actually math huh
  • 0
    @tokumei it's not hard to come up with the probabilistic extension of true/false. true=100%, false=0%, and probability goes in that interval. That's high school stuff.
  • 0
    @tokumei in java null is assigned to variables which dont have any memory references. We are talking about a value for indecisive boolean. Yes but working of the logic is still something yet to be discovered.
  • 0
    @bigus-dickus Qbit is something different; it's mainly about pouching government subsidiaries for useless shit that will never work, much like fusion power plants but with newer pretexts.
  • 0
    So for me, in typescript, a bool could have
    1) true
    2) undefined
    3) null
    4) false

    2 means, someone forgot to initialize this value, so one might stick to the defaults,
    3 means I deleted it or intentionally do want neither.

    Sometimes there are really applications for that :)
  • 0
    It's called analog, as opposed to Boolean which is binary (digital).
  • 0
    @BlackSparrow Dont know how my comment could be construed in that way, I was talking about null strictly in the context of fuzzy logic and how there are several different truth tables/interpretations for the same gates when dealing with such logic. I would link the various papers but I'm on mobile atm.

    @Fast-Nop Why do you feel the need to be condescending? Of course I've learned basic probability and stats, but I fail to see how null applies there specifically. Null in this context is used to say a given state is unknown, regardless of whether the logic around it is discrete or continuous.
  • 0
    @tokumei it's not condescending to note when obvious / established things are obvious / established. And the concept of "validity" bits along with the actual information is also established practice. For some data types, it's needed so often that it's already part of the definition, like NaN in IEEE floats.
Add Comment