On 3/6/12 7:32 PM, Brad Anderson wrote:
On Wednesday, 7 March 2012 at 00:25:19 UTC, Jonathan M Davis wrote:
On Tuesday, March 06, 2012 17:00:19 Brad Anderson wrote:
I wasn't around for the creation of datetime but I'm curious why a boost
datetime-like duration construction shortcut approach to durations
wasn't
used. That is, you can write weeks(1), months(6), years(10), hours(17),
minutes(12), etc. (although there is now days(int) for some reason).

Because then you've got incredibly common names used as top-level
symbols.

I understand the concern but, for what it's worth, I write project
scheduling software professionally so I spend a lot of time working with
dates and durations. I'd have no problem with these being top level even
though the chance of symbol clashing would be much higher for me than
most programmers. A standard library's datetime module seems like it
should have first dibs on those names anyway. I think it should gobble
up that real estate.

In fact there is no such thing as a top level in D. (I was quite surprised to learn that a few years ago, and found it quite brilliant of Walter.)

Andrei


Reply via email to