The rationale is that you can extend your switch conditions with more elsifs, but need not touch the tail. If "cannot happen" ever happens, you know you recently added a logical error.if (COND) { return 1; } elsif (OTHERCOND) { return 2; } else { die "cannot happen"; };
In reply to Re: if else and not reachable coding style
by Anonymous Monk
in thread if else and not reachable coding style
by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |