Arbitrary abbreviations in phobos considered ridiculous

foobar foo at bar.com
Wed Mar 7 11:42:30 PST 2012


On Tuesday, 6 March 2012 at 18:36:08 UTC, Adam D. Ruppe wrote:
> On Tuesday, 6 March 2012 at 18:06:46 UTC, H. S. Teoh wrote:
>> I have to disagree on this one.
>
> If it was actually
> "gratuitouslyOverlongFullySpelledOutVariableNames" I might
> agree, but curr vs current is a whole other story.
>
> Abbreviating a concept makes sense: i, j, rather than
> iterationIndex or whatever. You might say "std.random.uniform"
> rather than "randomNumberFromASetWithAUniformDistribution".
>
> But, abbreviating /words/ is where it gets silly.
> "rndNumSetUniDist" is a worse name than the long one,
> since not only is it verbose, it has bizarre abbreviations
> to remember too!
>
> "dur" is the same concept as "duration"; it isn't a simpler
> name. It isn't even significantly shorter. The biggest
> difference is it isn't my first guess.
>
>> The fault is with inconsistency, not with abbreviations.
>
> It is some of both: inconsistency with words I already
> know (regular English) is what leads to the first guess
> being wrong.

vote +infinity * 2
The most important point IMO - abbreviate concepts, not words.


More information about the Digitalmars-d mailing list