Proposal for custom time string formatting in std.datetime

Jonathan M Davis jmdavisProg at gmx.com
Wed Dec 21 22:36:19 PST 2011


On Wednesday, December 21, 2011 22:22:40 Walter Bright wrote:
> On 12/21/2011 8:12 PM, Jonathan M Davis wrote:
> > Yes, putting the custom formatting functions in increases the size of
> > the
> > module, but I think that if we want to do something about the size of
> > std.datetime, it would make more sense to move some of its existing
> > pieces out than to not put the custom time formatting on the types
> > themselves.
> I would seriously like to change to a "pay only for what you use" model for
> Phobos.

In general, I agree that that's a good policy. How expensive would you 
consider templated functions which aren't used to be with regards to that? 
They don't cost nothing, since they still have to be lexed and parsed, but 
they don't get fully compiled.

> Note that a module can be split into sub-modules without changing the
> interface for the user.

You mean create other modules that get publicly imported by one module? I do 
think that sections of std.datetime would benefit from that.

- Jonathan M Davis


More information about the Digitalmars-d mailing list