@cmuratori I recently started following Handmade Hero from the first episodes and one thing I noticed that you do differently to what I learned, is that you don't tend to do early returns. Is this more of a preference or do you have a practical reason for doing it this way?
-
-
I see, that makes sense. Thank you for the explanation!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
i find it common to evaluate error/abort cases at the start with several returns and then the main block is no returns until end; how do you like to approach those cases?
-
I just use nested if's, or a boolean on the handle that gets checked later, depending on the circumstance.
End of conversation
New conversation -
-
-
I try to have one return point if at all possible. In cases where I can short-circuit the function up front, I'll add one there.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.