MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/shittyprogramming/comments/bgaduu/space_efficient_lines_up_nicely/elk66rb/?context=3
r/shittyprogramming • u/jacobsilcoff • Apr 23 '19
58 comments sorted by
View all comments
Show parent comment
6
Now do ‘else’.
4 u/[deleted] Apr 23 '19 The semicolon shows the end of the statement so there's no ambiguity. ;) { } if (x); { } else; 10 u/dmitriy_shmilo Apr 23 '19 And you don’t see anything wrong with this? 4 u/[deleted] Apr 23 '19 Nope. 1 u/TeamKKKone Jun 30 '19 Maybe this?{ ... } if (x) else { ... } 3 u/Scyntrus Apr 24 '19 Python already has "y if x else z"
4
The semicolon shows the end of the statement so there's no ambiguity. ;)
{ } if (x); { } else;
10 u/dmitriy_shmilo Apr 23 '19 And you don’t see anything wrong with this? 4 u/[deleted] Apr 23 '19 Nope. 1 u/TeamKKKone Jun 30 '19 Maybe this?{ ... } if (x) else { ... }
10
And you don’t see anything wrong with this?
4 u/[deleted] Apr 23 '19 Nope.
Nope.
1
Maybe this?
{ ... } if (x) else { ... }
3
Python already has "y if x else z"
View all comments
Show parent comment
6
u/dmitriy_shmilo Apr 23 '19
Now do ‘else’.