| 166 | | |
| 167 | | Generalization is though not always the right thing to do: |
| 168 | | |
| 169 | | - Generalization is generally seen as anti-pattern in isolated use-cases |
| 170 | | - Generalization can require massively more development effort than the development of the solution itself, and can therefore be inefficient (low value/effort ratio) |
| 171 | | - The impact of and the necessary effort to correct defects and especially design flaws in generic solutions get multiplied by the (intended) re-use of the solution |
| 172 | | - Parametrization and introspection add additional processing efforts which can reduce efficiency and scalability below acceptable levels |
| 173 | | - Generalization can add additional possible points of failure (additional risk) |
| 174 | | |
| 175 | | Apart from that, generalization can make maintenance more difficult: developers who do not recognize/understand the general case can (and often do) re-introduce use-case specifics into generic code, thereby reducing its efficiency and flexibility, potentially causing side effects on other solution, and complicating maintenance. |