r/ProgrammerHumor • • Mar 15 '22

static bool isCrazyMurderingRobot = false;

/img/2g1k34ok5kn81.jpg
4.9k Upvotes

257 comments sorted by

View all comments

Show parent comment

17

u/[deleted] Mar 15 '22 edited Mar 15 '22

[removed] — view removed comment

11

u/32436861696e7a Mar 15 '22

Not nearly enterprise enough. return Boolean.TryParse(bool + 1 > 1, out Boolean temp) ? temp == true ? true : temp == false ? false : throw new Exception(“test 1”) : throw new Exception(“test b”);

8

u/production-values Mar 15 '22

without braces you return temp before the elses can ever run! Then even if grouped properly, your elses are superfluous because of returns above. But the math on bools ... chef's kiss

-1

u/nelusbelus Mar 15 '22

That doesn't even work because you don't have curlies, the else if isn't matched

1

u/Blingbike97 Mar 16 '22

Why not just return bool if bool is not a protected keyword.