Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
vortico
on April 6, 2020
|
parent
|
context
|
favorite
| on:
My Favourite Diff
Are you talking about the `else` being non-symmetric? You don't need it at all. I do this.
if (c == 1) { first case ; } if (c == 2) { second case; }
enriquto
on April 6, 2020
|
next
[–]
...and hereby I give back my programming license and go back to civil life.
pintxo
on April 7, 2020
|
prev
[–]
This might result in another fallthrough scenario though, wouldn't it?
vortico
on April 7, 2020
|
parent
[–]
No, because `c` can't be 1 and 2 at the same time.
pintxo
on April 8, 2020
|
root
|
parent
[–]
In this specific example. But you cannot rule it out in general.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: