3 ms·
The simple cases do come up though. I've written plenty of functions which amount to little more than a single if-statement and I have had people ask me to make
by Sean1708 9y ago
The simple cases do come up though. I've written plenty of functions which amount to little more than a single if-statement and I have had people ask me to make changes like
foo(things) {
stuff = do_work(things);
if (stuff) {
return a;
} else {
return b;
}
}
into
foo(things) {
stuff = do_work(things);
if (stuff) {
return a;
}
return b;
}
in code reviews.