21
votes
12answers
1k views

When does the “Do One Thing” paradigm become harmful?

For the sake of argument here's a sample function that prints contents of a given file line-by-line. Version 1: void printFile(const string & filePath) { fstream file(filePath, ios::in); ...