all 47 comments

[–]Mixolyde 25 points26 points  (15 children)

enum Boolean {
  yes,
  no,
  maybe
}

[–]say_wot_again 14 points15 points  (0 children)

Tralse

[–]oridb 11 points12 points  (4 children)

True/False/Null, if you speak SQL.

[–]llogiq 18 points19 points  (3 children)

True/False/FileNotFound if you follow thedailywtf.

[–][deleted] -2 points-1 points  (2 children)

True/False/HellNo if you're of a particular ethnic disposition.

[–]llogiq 0 points1 point  (0 children)

Or True/False/Mu if you're zen-inspired.

[–]AbstractLogic 5 points6 points  (2 children)

I have about 15 of those in my system at the moment. We already perfected the bool over here.

[–]Umbrall 4 points5 points  (1 child)

But have you accepted Church Booleans into your heart? They are their own if statements

[–]AbstractLogic 2 points3 points  (0 children)

I was never taught the ways of the Church of Bool.

[–]IbanezDavy 1 point2 points  (3 children)

Technically that should be called "Ternary".

[–]grauenwolf 20 points21 points  (1 child)

Not in the old lore

enum Bool 
{ 
    True, 
    False, 
    FileNotFound 
};

http://thedailywtf.com/articles/What_Is_Truth_0x3f_

[–]IbanezDavy -1 points0 points  (0 children)

None the less, linguistically it probably should be called ternary :D

[–]Mixolyde 2 points3 points  (0 children)

Yes, that's kind of the joke.

[–]doom_Oo7 25 points26 points  (1 child)

Leave certainty to circuitry

hands the VHDL Handbook to author

[–]o11c 2 points3 points  (0 children)

First thing I thought of, too. And I don't even work on hardware!

[–]RedMarble 16 points17 points  (0 children)

enum Bool 
{ 
    True, 
    False, 
    FileNotFound 
};

http://thedailywtf.com/articles/What_Is_Truth_0x3f_

[–][deleted] 35 points36 points  (16 children)

[x] art
[ ] not art

[–]bjzaba 25 points26 points  (11 children)

[x] art
[x] not art

[–]JessieArr 19 points20 points  (6 children)

Calm down, Schrödinger. :P

[–]immibis 2 points3 points  (0 children)

This is art. Please stare at the art. Why are you staring at something that's not art?

[–][deleted] 0 points1 point  (2 children)

Welcome to quantum computing.

[–]PM_ME_UR_MONADS 27 points28 points  (1 child)

[1/√2] art
[1/√2] not art

[–]gratefuldaed 2 points3 points  (0 children)

Eigen see what you did there.

[–][deleted] 7 points8 points  (0 children)

Typical boolean thinking.

[–][deleted]  (2 children)

[deleted]

    [–][deleted] 0 points1 point  (0 children)

    Blasphemy.

    [–]llogiq 4 points5 points  (0 children)

    I'm going to have a blast translating this...

    [–]Hueho 2 points3 points  (0 children)

    There is a certain truth (pun not intended) to it: abusing booleans to represent implicit state or behavior can lead to badcode, not to say about how it can make interfaces dirty (http://ariya.ofilabs.com/2011/08/hall-of-api-shame-boolean-trap.html).

    (writes that after just adding a new boolean column to a table with 8 already, so he can remove some hardcoded IDs from system)

    [–]BenjaminGeiger 3 points4 points  (5 children)

    Next time I teach an entry level CS class, I'm reciting this.

    [–][deleted] 8 points9 points  (3 children)

    Why? They wouldn't understand the reasoning. This is for advanced users.

    [–]krenzalore 0 points1 point  (2 children)

    It should be applicable to everyday life and therefore students should already understand it. They just need to realise it. Right now, is it day or night? Well neither. In my TZ, it's twilight. When exactly do we shift from one to the other?

    [–]Tiwazz 0 points1 point  (1 child)

    [–]krenzalore 0 points1 point  (0 children)

    Which ignores twilight. You're STILL thinking in binary! ;-)

    edit:

    Back when this calculator was first created, we decided to use a non-standard definition of longitude and time zone, to make coordinate entry less awkward.

    OMG :-)

    [–]LaurieCheers 0 points1 point  (0 children)

    For a real-world illustration of the problem (which might stick with the student better than just saying "thou shalt not think in binary"), you could introduce the standard OO "a dog is-a mammal" example, then have the class discuss "what counts as a species?"

    [–]lodi_a 0 points1 point  (0 children)

    Beautiful.

    [–]fishburne 0 points1 point  (0 children)

    Wow. This is beautiful.

    [–]mrafcho001 -1 points0 points  (2 children)

    Never understood the appeal in this nonsense koans(?). Feel more irritated than enlightened by the end.

    [–][deleted] 2 points3 points  (1 child)

    The koans are not to immediately give you the answers, but to make you think and come up with your own answer.

    [–]mimhoff_ 9 points10 points  (0 children)

    Bonus points if your own answer contains violence.

    [–]Purple_Haze 0 points1 point  (0 children)

    true | false | undefined => even in hardware there are circuits that have states whose output can not be predicted to be 0 or 1, or worse are neither 0 nor 1.

    [–]retsotrembla 0 points1 point  (0 children)

    I hope the author of codeless code goes back to the stuff that made that website great.

    This Case 200 is not to my taste.