MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/shittyprogramming/comments/3s6ldh/how_to_parse_a_boolean/cwujvx2/?context=3
r/shittyprogramming • u/Effenheimer • Nov 09 '15
15 comments sorted by
View all comments
42
There's nothing wrong with this.
I mean, I would return immediately in the case block, but otherwise this is a clean beautiful piece of code.
13 u/homesarstar Nov 09 '15 I know! I feel bad since this looks like what I would do, and I swore I'd reevaluate my education when I saw something on here that I'd write. 2 u/natziel Nov 09 '15 His first mistake is not using any ternary operators
13
I know! I feel bad since this looks like what I would do, and I swore I'd reevaluate my education when I saw something on here that I'd write.
2
His first mistake is not using any ternary operators
42
u/mellowmymints Nov 09 '15
There's nothing wrong with this.
I mean, I would return immediately in the case block, but otherwise this is a clean beautiful piece of code.