ID | FCNS-11 |
Title | Functions should do precisely one thing well, and encapsulate a single idea. |
Priority | Strongly recommended |
Severity level | 4 |
Description | Single responsibility principle : all sub-functions and most functions should do one thing very well, and encapsulate a single idea. |
Rationale | The single responsibility principle makes code more readable, modular, and testable. Multi-purpose functions can often be split up into atomic units which are called on the input data in sequence. Functions should not try to be all things to all users. |