Arbitrary abbreviations in phobos considered ridiculous

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Mar 6 11:17:03 PST 2012


On Tue, Mar 06, 2012 at 08:04:49PM +0100, Adam D. Ruppe wrote:
> On Tuesday, 6 March 2012 at 18:37:25 UTC, Nick Sabalausky wrote:
> >I'm very much in favor of "curr".
> 
> If three characters make a big difference in really
> anything, that's the real WTF. It is trivial to
> type or to see on the line. (It might add up if
> you refer to it a bunch of times, but in that case,
> just use a local variable instead.)
> 
> 
> I see this as more like "creat" and "umount" vs "create" and
> "unmount" than "foo" and "thisIsAnExampleFunctionThatWouldNormally-
> BeNamedFooButHereIWantedToGiveItAMoreDescriptiveSelfDocumenting-
> NameBecauseThatsTheGoodThingToDoAmIRite".
> 
> None of the differences matter, except for the remember
> difficulty; looking it up, even once, will cost more than
> seeing it a thousand times.

I stand by my point that if the abbreviation is *consistent*, then this
is a non-problem. E.g., if "current" is *always* abbreviated "curr",
then you know that it's currTime, currDay, currWhatever, and you never
need to try "currentDay".

As for looking it up once, you have to do that the first time anyway, to
even know what the function does. It's no different from learning D
keywords once, and then you know what to call them thereafter.


T

-- 
What do you mean the Internet isn't filled with subliminal messages? What about all those buttons marked "submit"??


More information about the Digitalmars-d mailing list