re: Compact or Verbose Codestyle? VIEW POST

FULL DISCUSSION
 

If forced to choose between the two, definitely "Verbose". I think it's TOO verbose though. I don't see why it needs all the intermediate variables after the early throw if statement.

I can almost guarantee that coming back to either of these examples 6 months after writing it, it will take less time to understand the explicit if statement and behavior in the "Verbose" example. Even if it only takes an extra few seconds to read the "Compact" example, that still adds up if you're reading through an entire code path and trying to understand it.

code of conduct - report abuse