[OT] Re: Proposal for custom time string formatting in std.datetime

Jonathan M Davis jmdavisProg at gmx.com
Thu Dec 22 08:12:32 PST 2011


On Thursday, December 22, 2011 15:44:48 Piotr Szturmaj wrote:
> Walter Bright wrote:
> > My first thought is that std.datetime is already very large. Few will
> > need a custom date formatter, so it should be in a separate module to:
> > 
> > 1. reduce cognitive load on the programmer
> > 
> > 2. reduce the overhead pulled in for every program that may want to use
> > an std.datetime function, but not need custom formatting
> 
> Why not just extract unittest code to separate module?

Because it's harder to maintain that way. The interval types are templated, so 
their unit test blocks can't be next to the functions that they're testing, 
and it's a royal pain to manage those tests in comparison to the others. It's 
_really_ nice to have the tests right next to the functions that they're 
testing.

- Jonathan M Davis


More information about the Digitalmars-d mailing list