Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Google's updated Java coding guidelines. Parent comment
Code clarity. Depending on how and what you're doing in each case a switch statement can be easier to read than a whole series of if .. else blocks.
And sometimes, given that they are equivalent, it's just a style choice on the part of the programmer.
There are no comments on this comment yet.
Code clarity. Depending on how and what you're doing in each case a switch statement can be easier to read than a whole series of if .. else blocks.
And sometimes, given that they are equivalent, it's just a style choice on the part of the programmer.