On Tue, 2014-06-03 at 10:00 -0700, Jonathan M Davis via Digitalmars-d wrote: > On Tue, 3 Jun 2014 07:21:12 -0700 > "H. S. Teoh via Digitalmars-d" <[email protected]> wrote: > > > https://issues.dlang.org/show_bug.cgi?id=12846 > > > > Since when is x.hours, x.minutes, etc., deprecated? > > As of Sunday. The problem is that they seem to be very prone for misuse.
I think x.hours and x.minutes are fine per se. I would suggest deeper investigation of the perceived problems rather than just deprecate then remove. > Not only do they not match what TickDuration uses those same names for (it > uses them for the equivelent of total!"hours"(), etc. rather than > get!"hours"(), etc.), which has come up a number of times before, but what > I've found at work (where we have a C++ port of Duration) is that pretty much > everyone keeps using get when they meant total, consistently causing subtle > bugs. So, I've come to the conclusion that the current design is just too > bug-prone, and by deprecating the individual getters and renaming get to > getOnly, I hope that that will seriously reduce the risk of misuse. This all sounds like implementation detail rather than API usage. I admit not having used this stuff in D, but the same basic system exists in Groovy and it works just fine. […] -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:[email protected] 41 Buckmaster Road m: +44 7770 465 077 xmpp: [email protected] London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
