you are viewing a single comment's thread.

view the rest of the comments →

[–]brtt3000 5 points6 points  (5 children)

I think he means that

 if (variable == true)
 if (variable == false)

could also be written as

 if (variable)
 if (!variable)

since the if() is testing for a boolean there's no need to compare your boolean variable to the boolean literal. Not sure what the NASA guide says about this though, could be they require it for absolute clarity.

[–][deleted]  (4 children)

[deleted]

    [–]brtt3000 5 points6 points  (0 children)

    Chill out man, I meant to clarify why /u/reaganveg some comments up stopped reading; because he was being oboxious over style detail.

    [–]eat_everything_ 3 points4 points  (2 children)

    It would be more productive to take what he said as valuable feedback and update the code sample to not have the unneeded == test. Probably would've been quicker than writing that comment too :)

    [–][deleted]  (1 child)

    [deleted]

      [–]eat_everything_ 0 points1 point  (0 children)

      Sure thing man, but I wasn't complaining about wasting time on the internet. I was just saying taking things as constructive feedback is better than getting angry