3 ms·
Yes, I absolutely agree with this. I think there is great value in returning early on error; think of them as guards checking that you have the values you need
by meling 3y ago
Yes, I absolutely agree with this. I think there is great value in returning early on error; think of them as guards checking that you have the values you need for the next logic step. In the original version you may have to read the whole function to understand why it failed.