Make dur a property?

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Wed Jan 23 19:37:31 PST 2013


On Wed, 23 Jan 2013 22:53:45 +0100
Timon Gehr <timon.gehr at gmx.ch> wrote:
> 
> Likewise, there is no problem with 2.days.ago.
> 
> Clock.currTime() - dur!"days"(2) is more verbose without being more
> clear.

*IMO*: The problem with that latter example is just (what I see as) some
unfortunate choices for naming and such. Alter it like this:

now() - days(2)

And I think that's no longer overly verbose, has great clarity, and
does so without feeling too cute or magical.

Of course, like I said before, I could live with 2.days.ago, but it's
not really what I'd prefer.



More information about the Digitalmars-d mailing list