Arbitrary abbreviations in phobos considered ridiculous
deadalnix
deadalnix at gmail.com
Fri Mar 9 04:42:46 PST 2012
Le 09/03/2012 11:58, Jonathan M Davis a écrit :
>> This is not alias. This is about accepting template parameters. The
>> actual isn't very consistent anyway (seconds, but usecs ?).
>
> It amounts to the same thing, and core.time and std.datetime are as consistent
> as they're going to get. seconds are _always_ seconds, and _no_ units greater
> than seconds are ever abbreviated. Only the sub-second units are abbreviated.
> And they're abbreviated only because they would have been way too long
> otherwise. And making seconds secs would create even _more_ inconsistencies.
> Just read the discusion in the pull request:
>
> https://github.com/D-Programming-Language/druntime/pull/173
>
> - Jonathan M Davis
Yes, this is consistent in this regards. What isn't consistent is to
choose to not abbreviate seconds, hours, minutes, but to abbreviate
nsecs, usecs.
Considering the existing codebase, I think the best option now is to
allow both. In an ideal worlds, I would argue that we go for all
abbreviation or none.
I did read, the topic. Interesting, but I think walter isn't consistent
with its own argumentation on point 6. Consider that in french, « dur »
means « hard ». Even associated with keyword like dlang, this is 100%
ungooglable. He is also plain wrong on point 5. No progress is made for
experienced D programmers (arghuably, it is a step backward for such
people), but for newcomers it is. At some point, we will have to
consider newcomers as an important subject.
I do agree with most other points, this is not good to have 2 names for
the same thing. However, the actual names are confusing, it seems that
this thread make it pretty much clear. A lot of people have trouble with
dur and seconds. Now, instead of changing everything that exists, lets
make secs available. This isn't perfect, but it is the consequence of
the inconsistency of naming convention that occurs (between sub seconds
units and other units) in a first place, not the ideal case.
More information about the Digitalmars-d
mailing list