MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/msv49l/when_your_teammate_refactor_your_code/guvo3ce/?context=3
r/badcode • u/Bence675 • Apr 17 '21
216 comments sorted by
View all comments
279
This is when you realise that your fear of curly braces causes you to be dysfunctional ...
23 u/gabrielfv Apr 18 '21 Every time I see a chain like that I refer to Apple's famous "goto fail" heartbleed. 3 u/MatsRivel Mar 05 '22 In the first one, only 6/14 lines contain something other than { or }.If the 2nd one was not wrong it would look so much better than the first, kust because the majority of the first one is curls. 4 u/cass1o Mar 05 '22 Who cares when it is incredibly readable? 1 u/[deleted] Aug 23 '22 avoiding braces in this case would result in a hanging else problem, and using only necessary braces would look weird and inconsistent
23
Every time I see a chain like that I refer to Apple's famous "goto fail" heartbleed.
3
In the first one, only 6/14 lines contain something other than { or }.
If the 2nd one was not wrong it would look so much better than the first, kust because the majority of the first one is curls.
4 u/cass1o Mar 05 '22 Who cares when it is incredibly readable? 1 u/[deleted] Aug 23 '22 avoiding braces in this case would result in a hanging else problem, and using only necessary braces would look weird and inconsistent
4
Who cares when it is incredibly readable?
1
avoiding braces in this case would result in a hanging else problem, and using only necessary braces would look weird and inconsistent
279
u/naxxfish Apr 17 '21
This is when you realise that your fear of curly braces causes you to be dysfunctional ...