From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10ad19,23963231b5359f74 X-Google-Attributes: gid10ad19,public X-Google-Thread: 1073c2,23963231b5359f74 X-Google-Attributes: gid1073c2,public X-Google-Thread: 11440e,23963231b5359f74 X-Google-Attributes: gid11440e,public X-Google-Thread: 101deb,23963231b5359f74 X-Google-Attributes: gid101deb,public X-Google-Thread: 10a146,23963231b5359f74 X-Google-Attributes: gid10a146,public X-Google-Thread: 103376,23963231b5359f74 X-Google-Attributes: gid103376,public X-Google-Thread: 107a89,23963231b5359f74 X-Google-Attributes: gid107a89,public X-Google-ArrivalTime: 2001-05-24 22:53:10 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!falcon.america.net!sunqbc.risq.qc.ca!nntp.primenet.com!nntp.gblx.net!news.phx.gblx.net!monty From: Jim Monty Newsgroups: comp.lang.ruby,comp.lang.ada,comp.lang.awk,comp.lang.clarion,comp.lang.java.programmer,comp.lang.pl1,comp.lang.vrml Subject: Re: Long names are doom ? Date: 25 May 2001 06:19:13 GMT Organization: Primenet Message-ID: <9ekth1$49o$1@nnrp1.phx.gblx.net> References: <3B0DBD4A.82943473@my-deja.net> <3B0DD011.88FCD00E@acm.org> NNTP-Posting-Host: usr08.primenet.com X-Complaints-To: abuse@gblx.net X-Posted-By: monty@206.165.6.208 (monty) Xref: archiver1.google.com comp.lang.ruby:9881 comp.lang.ada:7748 comp.lang.awk:2585 comp.lang.clarion:20306 comp.lang.java.programmer:70590 comp.lang.pl1:629 comp.lang.vrml:3310 Date: 2001-05-25T06:19:13+00:00 List-Id: Patricia Shanahan wrote: > 00001111 wrote: > ... > > - "it degrades the legibility of a program to use identifiers that > > can't be easily remembered...." > ... > > That is the most important single point, and the reason why long > identifiers are a good thing to have available. > > Abbreviations in identifiers make them less memorable. For a given > concept, there is the full name and possibly several ways of > abbreviating it, and anyone using it has to remember which to use. I try > to avoid them in public names, including class names. Would you be "less memorable" if you were Patricia_Shanahan@Association_of_Computing_Machinery.Organization instead of simply pats@acm.org? Easily ninety percent of all Web users have no idea what any of the abbreviations http, www, com, org, etc. stand for. But does that make it harder for them to remember the URL www.mtv.com? Imagine a typical URL spelled out in its entirety. It would be absurdly long and unwieldy! We use abbreviations for various reasons, not the least of which is as a mnemonic aid. This is certainly true of identifiers in computer programming languages. > Also, a consistent naming system makes names more memorable. I don't think anyone would disagree with that. But given two consistent naming systems (or two inconsistent naming (non-)systems), which one is to be preferred: the one that allows long names or the one that does not? There's no One Answer for every language, culture, compiler, company, and circumstance. This topic is mostly fodder for religious wars. > Sometimes, very rarely, a consistent naming scheme can lead to a > situation in which limiting the name to e.g. 31 characters would require > it to either break its naming convention or have some components > abbreviated. So abbreviate consistently. And don't forget to use acronyms, too ("EOF", "NaN", etc.). > For example, take a look at the constant names in > javax.accessibility.AccessibleContext. Names such as > "ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED" could be made shorter by > either abbreviating or not using a consistent scheme, but doing so would > make them harder to remember. In Fortran I suppose it would be called > something like ACCTABCOLDESCCHNGE. Or ACCESS_TBL_COL_DESC_CHGD (24 characters). This is no more difficult to remember than your 43-character, spelled-out version. Indeed, I have seen each of these same four abbreviations used many times before. They're pretty standard. -- Jim Monty monty@primenet.com Tempe, Arizona USA