News for hackers. Stuff that matters.
Re:Anti-If: The missing patterns (2016) by Flow on Wednesday June 27, 2018 @02:49PM (#17410738)
I always say that if you know the answer, why convolute the code? Just return the damn answer and we're done here.

I see these early returns as a list of assumptions. It helps making them nicely lined up, with perhaps some comments before each, and an empty line between them.

And then when you get below to the, now non-nested, code that actually does some work you have a smaller mental burden needed to understand what is actually done.

There are no comments on this comment yet.