34
Ma30h
7y

Well how do you check booleans?

Comments
  • 6
    if (!!state){}
  • 0
    I always check for falseness in the most tedious way.
  • 1
    @ThatDude where is ur setter son
  • 1
    Lol you need to change the first and the third picture so it's true
  • 5
    @ThatDude The meme was funny. You broadcasting that you down voted the post was not.
  • 1
    if condition == True and condition != False:
    # do your thing
  • 4
    @ThatDude if you don’t like a rant, please downvote it and move on. What’s “shitty” to some people isn’t to others and a comment beyond a downvote isn’t needed, like @AlgoRythm said.
  • 2
    @ThatDude why do you find it difficult?
  • 2
    @ThatDude we’re trying to avoid people doing that. That’s what voting is for. Commenting on the rant with negativity often derails the conversation like it did here and makes users feel unwelcome in the community.

    This is a perfectly good rant. I enjoyed it. You’re entitled to dislike it, but we ask that you use the appropriate downvote reason and not a negative comment bashing the content uploader. This is explicitly what the downvote feature is for.
  • 1
    You don’t have to downvote it if you don’t want. But please don’t comment on it.
  • 1
    @ThatDude thanks. We’re trying to get away from it because we’ve gotten a number of complaints lately (not about you) about the behavior in general.
  • 0
    I have to admit, I lol'd
  • 2
    I know it's a meme but I usually use the second case for readability. It's not always clear if it's a Boolean or an empty string in the condition.

    The third one though. Just kill it with fire.
  • 0
    @Python That's true, but I like to prefix my booleans with "is"
  • 2
    void checkValue(bool) {
    if (bool != !false) {
    Return !true
    }
    Return !!true
    end

    if(checkValue(bool) == !false) {
    newBool = checkValue(bool) == true
    Else
    newBool = checkValue(bool) == true
  • 1
    @SpencerBeige epic
Add Comment