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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2afac1a4161c7f35 X-Google-Attributes: gid103376,public From: nobody@REPLAY.COM (Anonymous) Subject: Re: Two simple language questions (plural types) Date: 1998/01/12 Message-ID: <199801121523.QAA06527@basement.replay.com>#1/1 X-Deja-AN: 315238658 Content-Transfer-Encoding: 7bit References: X-001: Replay may or may not approve of the content of this posting X-002: Report misuse of this automated service to X-URL: http://www.replay.com/remailer/ Content-Type: text/plain; charset=us-ascii Organization: Replay Associates, L.L.P. Mail-To-News-Contact: postmaster@nym.alias.net Newsgroups: comp.lang.ada Date: 1998-01-12T00:00:00+00:00 List-Id: <68uq34$7tk@tomquartz.niestu.com> <697p89$b5j@top.mitre.org> On Sat, 10 Jan 1998 11:10:50 -0800, mheaney@ni.net (Matthew Heaney) wrote: > In article , dewar@merv.cs.nyu.edu (Robert Dewar) wrote: > > > >... > > Hallelujah! Robert, once again you bring order to chaos. I completely > agree that plural names should be used to denote, well, plural objects - > aggregates of some kind. For example, if I have a color object that stores > the value of a single color, then of course the singular declaration > > The_Color : Color; > There are some hard and fast rules about using plurals for type and variable names: 1. There are no hard and fast rules. 2. Plurals should never be used for type or variable names. 3. This is all opinion; consistency is more important than anything else. However, this is a lot of objective evidence that shows that common prefixes are bad. The first few characters of names are the most important in telling names apart; if all variable names in a program start with a common prefix ("The_"), then it is harder to tell the variables apart. This is not opinion; it is fact. The origin of "The_" for all parameters seems to come from books by someone who could not come up with good type names, and so used the preferred form for the parameter name for the type name, leaving nothing good for the parameter name. (I don't have any of the books available, so I can't be sure about variable names.) Those who advocate plurals for type names are generally also unable to create good type names, but they at least want to keep the best form for parameters/variables. I also object to the use of suffixes that add no information to the name ("_Type", "_T"); this is just another kludge by those who cannot create good type names. I prefer a collection of kludges that do add information, but this is a rehash of a previous posting, so I'll say no more. Jeff Carter PGP:1024/440FBE21 My real e-mail address: ( carter @ innocon . com ) "We burst our pimples at you." Monty Python & the Holy Grail Posted with Spam Hater - see http://www.compulink.co.uk/~net-services/spam/