2 ms·
I'm saying that if statements that can be converted to switches usually are converted to switches. Something like: if (x == 5) { doSomething()
by tombert 22d ago
I'm saying that if statements that can be converted to switches usually are converted to switches.
Something like:
if (x == 5) {
doSomething()
} else if (x == 6) {
doSomethingElse()
}
This can be trivially converted into a switch and generally is. Run a release build and check me if you'd like.