Are you saying you prefer example 2, in the comment you replied to?<p>In Java-land, this seems to be the kind of thought process referred to as &quot;engineering&quot;.  Read the code in any random Spring project, for example.<p>Personally, I prefer writing simple code for the job at hand, and, yes, refactoring when I find two or more places where the same code can be re-used.  And even though I develop mostly in Java, the most &quot;functional&quot; solution is generally the one with the least complexity, and easiest to debug.