2 ms·
I don't think there's a general statement to be made about this. I have no problem reading both examples and actually prefer the first. But it depends on the wh
by jahewson 11y ago
I don't think there's a general statement to be made about this. I have no problem reading both examples and actually prefer the first. But it depends on the what the specific logic is - some conditions are easy to understand, despite their size, others are small but subtly complex. I certainly wouldn't want to mandate writing code like your second example without considering the use case first - YMMV.