News for hackers. Stuff that matters.
Re:There’s No Such Thing as Clean Code by qayxc on Friday January 28, 2022 @06:33AM (#30113373)
Depends entirely on the metric used.

Cyclomatic complexity would put if/else behind polymorphism while using lines of code and depth of inheritance would favour the if/else way.

That's the crux with software - there's not always an objectively better solution in terms readability/comprehensibility and some metrics that try to capture these qualities are inherently at odds with each other.

There are no comments on this comment yet.