Post

@CodeRed_dev i prefer doing 0 and 1 instead of false and true tbh lol
English

@CodeRed_dev Whaaat?
if (bool != true)
{
}
The Right Way™
English

@CodeRed_dev Half my codebase uses if(!function) where the function is a bool function as function calls. Handy for exception proofing, but it doesn't register as a function call in Visual Studio so it makes tracking stuff way harder. Confused the hell out of me when I started working in it.
English


@CodeRed_dev I am the third one.
I use both interchangeable throughout my code, no one can know what i am doing if i dont know what i am doing😂😅
English

@CodeRed_dev Both wrong with that opening curly brace on it's own line 😅
English

@CodeRed_dev if(bool is typeOf(bool) && bool == false)
{
//can't be too safe
}
English

@CodeRed_dev I always do the ! but nowadays I try to use the == false as I've learned it's easier to read code if all the code is consistent; variable == status for everything is much easier to scan.
English

@CodeRed_dev EVERYTHING must be a ternary, EVERYTHING must be a lambda, NO ONE SHALL be able to read my code but ME.
English

@CodeRed_dev "bool" is a keyword in the languages I use, so both examples won't compile.
But on the topic itself, I don't have a strong opinion and both are equally good to me.
English

@CodeRed_dev >Be me
>Godot dev
if not bool:
{
do_stuff()
}
English

@CodeRed_dev Second option is right and I will die on this hill
English

@CodeRed_dev Imagine a world of people being boolean, true or false, no greys or "yes, but", don't know if it's good or pure evil.
English

@CodeRed_dev I'm the 3 type 🙃
If(bool)
{
}
Else
{
...
}
English

@CodeRed_dev those are both me but at different experience level
English

@CodeRed_dev I'll channel my inner @Phantom_TheGame and throw "if(booln't)" your way
English

@CodeRed_dev 3rd option:
if (false == bool)
{
}
also known as "yoda conditions"
English

@CodeRed_dev Then there's fun in java where strings need
if (string.equals("the thing") {
}
English

















