A concern is a distinct behavior or piece of knowledge that software must address. Separating code by concern creates manageable pieces, reduces the knowledge you must hold in mind, and makes intent easier to follow. section 2.0
Separate concerns at several levels, choosing boundaries that reflect distinct activities:
- Functions can isolate focused behaviors such as choosing input, printing options, or determining a result. section 2.2.1
- Classes, modules, and packages can establish larger boundaries when responsibilities or knowledge begin to mix. section 2.0 section 9.3
Generalizing a group introduction
A fan-page function that knows both the Three Stooges title and how to introduce names mixes concerns. Extracting the title as an argument supports other groups, while join_names() separately handles name formatting. section 2.2.1
