DateTime.opBinary

Chris Wright via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Nov 30 08:15:59 PST 2015


On Mon, 30 Nov 2015 01:30:28 -0800, Jonathan M Davis via
Digitalmars-d-learn wrote:

> On Sunday, November 29, 2015 23:53:41 Chris Wright via
> Digitalmars-d-learn wrote:
>> Unfortunately, ddoc doesn't automatically cross-reference these for
>> you,
>> which results in confusion. (As if it weren't confusing enough to have
>> everything wrapped in templates with filters rather than simply using
>> const(Duration).)
> 
> Once TickDuration finally goes away, then functions like DateTime's
> opBinary can be simplified to just take Duration.
> 
> But until TickDuration and the few things that use it in their API have
> gone through the deprecation process, we're stuck with it in places like
> this.
> 
> - Jonathan M Davis

Or with explicit overloads, which would be easier to document and easier 
to read and as easy to maintain.


More information about the Digitalmars-d-learn mailing list