Arbitrary abbreviations in phobos considered ridiculous

Jonathan M Davis jmdavisProg at gmx.com
Fri Mar 9 10:59:13 PST 2012


On Friday, March 09, 2012 10:01:19 Brad Anderson wrote:
> On Fri, Mar 9, 2012 at 1:46 AM, Jonathan M Davis <jmdavisProg at gmx.com>wrote:
> > On Friday, March 09, 2012 09:33:20 deadalnix wrote:
> > > Le 07/03/2012 02:00, F i L a écrit :
> > > > I personally find it much easier to remember and use longer, more
> > > > sentance-like method names. However, Jonathan and others obviously
> > > > feel
> > > > more comfortable writing with a high level of abbreviation, which they
> > > > justify rather well. Still, if D's goal is to gain popularity, I think
> > > > it should take notices of other rising languages like C#.
> > > > 
> > > > The problem with making any change to Phobos is backwards
> > 
> > compatibility.
> > 
> > > We just need a politic for the change. IE: make the old name a warning,
> > > then deprecated, then remove it. Spread the process to a year or so.
> > 
> > We're not changing symbol names without a good reason. Yes, there's a
> > deprecation process that allows us to change them if we need to, but it's
> > still disruptive.
> > 
> > - Jonathan M Davis
> 
> The "secs" and "seconds" inconsistency is something I've seen people in IRC
> hit and complain about on several occasions. The dur!"seconds"(1) syntax
> I've seen complained about or confusion over on both IRC and on reddit by
> active and potential users. While I don't feel particularly strong about
> these issues I feel I should point out that actual users are hitting them
> and the issues bug them enough that they feel the need to
> complain publicly. Changes must be made with care but the former issue on
> inconsistency, I would argue, is a bigger issue than, say, the current
> symbol deprecation/replace of toISOExtendedString (though I don't know the
> history of the decision to make the change).
> 
> There shouldn't be two ways of expressing the exact same thing so the
> "secs"/"seconds" should be a substitute and deprecate process rather than
> just a simple alias if it were made. It looks like it's been rejected
> already, though, which is unfortunate. phobos is still a young library (or
> at least parts of it, like datetime, are) and so these types of wart
> removal could be made with limited disruption to current users.

As I explained in the pull request, if we switched to secs, it would just 
create a different set of inconsistencies:

https://github.com/D-Programming-Language/druntime/pull/173

There would just be a different set of complaints if seconds were changed to 
secs. No matter what we do here, we lose. Someone's going to be complaining. 
There is no perfect solution.

And while the library is young, it really needs to be stabilizing given that 
we want D to be real player in the programming world, and there is increasing 
resistance to changing it - especially from Walter and Andrei. If a breaking 
change is made, the change needs to be a clear win. And while using secs would 
certainly please some people, it would create it's own set of problems, so 
it's not at all a clear win IMHO.

- Jonathan M Davis


More information about the Digitalmars-d mailing list