[phobos] Split std.datetime in two?

spir denis.spir at gmail.com
Fri Feb 11 11:52:14 PST 2011


On 02/11/2011 08:20 PM, Steve Schveighoffer wrote:
>   At some point, factoring out repetitive code becomes more harmful than the alternative.  I feel like unit tests are one of those cases.

Hum, had a similar thought recently. I started to "unfactor out" some pieces of 
code into very basic caller funcs (the kind that constantly get called, thus 
would appear on top of a profiler's output in terms of number of executions). 
The initial reason was lack of knowledge about whether the tool funcs would be 
inlined or not (reason for the other thread).
Then, I realised the result is sometimes easier to understand, provided the 
initially factored out part is properly "titled" by a comment, especially when 
it is non-obvious to identify as a kind of sub-task.

Denis
-- 
_________________
vita es estrany
spir.wikidot.com



More information about the phobos mailing list