
Clean Code – How to Write Amazing Functions
Coding Blocks
00:00
You Could Flip the State and Reduce Your Invention Levels, Right?
If if you have that return early, then there's some sort of branch happening. You've got to have at least one level of nesting in addition to your function,. If it doesn't need then there's only going to be one return anyway. Yes, i would say generally speaking, i try and stick to one, but i will return early. I'll take readability over shortness of code any day. Well, i mean, i've still tak my short code, but sometimes the whole inversion thing is to save you a line or two lines, right? It's been a while since i usury sharper, but, oh, blasphemy. Ye.
Transcript
Play full episode