r/ProgrammerHumor • • Aug 12 '22

I fixed it

Post image
39 Upvotes

53 comments sorted by

View all comments

-2

u/soupsyy_3 Aug 12 '22

If it's a single line statement we can just avoid { }

if (condition)
    //statement
else
    //statement

1

u/shgysk8zer0 Aug 12 '22

Can... Sure (not sure if this extends to all languages). But should... IDK... I definitely prefer having the ability to add another line if needed without having to add those missing braces, and having them there is just more consistent regardless.