News for hackers. Stuff that matters.
Re:Using the switch(true) pattern in JavaScript by tengbretson on Monday April 12, 2021 @04:42PM (#26784892)
I've grown to dislike the early return pattern. It's pitched as a way to reduce visual complexity by reducing levels of indentation, but I don't actually find that to be a benefit in most cases. Reducing indentation is just a trick to shove more cyclomatic complexity into a function without it triggering your sensibilities to implement proper abstractions.

There are no comments on this comment yet.