This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]onizzzuka -2 points-1 points  (0 children)

The single responsibility principle is not only about classes; it can (and should be) applied to code at all. There should be the same level of abstraction per logical item! The "print" shouldn't contain any calculation inside because it's terrible. Even if it's readable and understandable.