Arbitrary abbreviations in phobos considered ridiculous
Jonathan M Davis
jmdavisProg at gmx.com
Thu Mar 8 16:07:43 PST 2012
On Thursday, March 08, 2012 12:10:07 H. S. Teoh wrote:
> IMO, making all abbreviations in Phobos consistent would be a big step
> forward.
You know, people keep saying that the abbreviations are inconsistent, but I
don't buy that. _What_ abbreviations are inconsistent?
AFAIK, core.time and std.datetime are 100% consistent with all of their
abbreviations. Stuff is always abbreviated or not - it's never abbreviated in
some places and not in others - and stuff that's abbreviated is always
abbreviated the same way. The _only_ argument for inconsistency that I see is
that seconds is never abbreviated, while the sub-second units (which have
seconds in their names) are always abbreviated. But the API is completely
consistent on what it does and doesn't abbreviate it and how it abbreviates
it.
And no examples outside of core.time and std.datetime have been given. What
else is inconsistent in Phobos with regards to abbreviations. It's not like we
have a ton of stuff that we keep abbreviating differently all over the place.
It's quite possible that there is an occasional case of two versions of a
particular abbreviation being used somewhere (e.g. cur vs curr), but AFAIK,
that's quite rare. We _do_ use abbreviations, but we don't use them heavily.
Most functions are one or two words, many with no abbreviations at all.
I really get the impression that this whole abbreviation "inconconsistency"
thing is being blown out of proportion based on a few function names that some
of the people in this thread don't like (e.g. currTime). I don't buy that the
abbreviation inconsistency really exists.
And we've actually _reduced_ the number of inconsistencies in Phobos by fixing
most of the functions and enums which weren't camelcased so that they're
properly camelcased. I just don't see any real problem here.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list