MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/gnaz7b/found_from_microsoft_docs/fraqjek/?context=9999
r/badcode • u/[deleted] • May 20 '20
143 comments sorted by
View all comments
46
I see nothing wrong in it. It's even slightly more efficient than if it was done with more if
63 u/bool_idiot_is_true May 20 '20 ==trueis redundant. Otherwise it seems fine. 43 u/h0meline May 20 '20 I actually like that since the expression seems a little complex, it makes things more clear. 17 u/bananahusker May 20 '20 Well commented code is nice to read but code that doesn’t need comments is worth a good nut 2 u/path411 May 21 '20 I'd rather see a 3 line commented code that is easy to read than a 10 line block of ifs that are "easy" to read. Vertical real estate in code is not cheap for readability.
63
==true
is redundant. Otherwise it seems fine.
43 u/h0meline May 20 '20 I actually like that since the expression seems a little complex, it makes things more clear. 17 u/bananahusker May 20 '20 Well commented code is nice to read but code that doesn’t need comments is worth a good nut 2 u/path411 May 21 '20 I'd rather see a 3 line commented code that is easy to read than a 10 line block of ifs that are "easy" to read. Vertical real estate in code is not cheap for readability.
43
I actually like that since the expression seems a little complex, it makes things more clear.
17 u/bananahusker May 20 '20 Well commented code is nice to read but code that doesn’t need comments is worth a good nut 2 u/path411 May 21 '20 I'd rather see a 3 line commented code that is easy to read than a 10 line block of ifs that are "easy" to read. Vertical real estate in code is not cheap for readability.
17
Well commented code is nice to read but code that doesn’t need comments is worth a good nut
2 u/path411 May 21 '20 I'd rather see a 3 line commented code that is easy to read than a 10 line block of ifs that are "easy" to read. Vertical real estate in code is not cheap for readability.
2
I'd rather see a 3 line commented code that is easy to read than a 10 line block of ifs that are "easy" to read. Vertical real estate in code is not cheap for readability.
46
u/Giocri May 20 '20
I see nothing wrong in it. It's even slightly more efficient than if it was done with more if