|
|
|
|
|
by cogman10
788 days ago
|
|
Updates to languages (don't know where C# is on this) have different types of switch statements that eliminate the `break` problem. For example, with java there's enhanced switch that looks like this var val = switch(foo) {
case 1, 2, 3 -> bar;
case 4 -> baz;
default -> {
yield bat();
}
}
The C style switch break stuff is definitely a language mistake. |
|