comp.lang.ada
 help / color / mirror / Atom feed
From: nobody@REPLAY.COM (Anonymous)
Subject: Re: Two simple language questions (plural types)
Date: 1998/01/12
Date: 1998-01-12T00:00:00+00:00	[thread overview]
Message-ID: <199801121523.QAA06527@basement.replay.com> (raw)
In-Reply-To: mheaney-ya023680001001981110500001@news.ni.net


<68uq34$7tk@tomquartz.niestu.com>
<mheaney-ya023680000701980209270001@news.ni.net>
<697p89$b5j@top.mitre.org> <dewar.884450142@merv>

On Sat, 10 Jan 1998 11:10:50 -0800, mheaney@ni.net (Matthew Heaney)
wrote:

> In article <dewar.884450142@merv>, 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/




  parent reply	other threads:[~1998-01-12  0:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-07  0:00 Two simple language questions Chip Richards
1998-01-07  0:00 ` Dale Stanbrough
1998-01-07  0:00 ` Tucker Taft
1998-01-07  0:00 ` Robert Dewar
1998-01-07  0:00 ` Matthew Heaney
1998-01-10  0:00   ` Two simple language questions (plural types) Michael F Brenner
1998-01-10  0:00     ` Robert Dewar
1998-01-10  0:00       ` Matthew Heaney
1998-01-10  0:00         ` Robert Dewar
1998-01-12  0:00         ` Anonymous [this message]
1998-01-12  0:00           ` Brian Rogoff
1998-01-12  0:00           ` Matthew Heaney
1998-01-12  0:00             ` Brian Rogoff
1998-01-13  0:00               ` Robert Dewar
1998-01-13  0:00                 ` Distinguishing type names from other identifiers Nick Roberts
1998-01-13  0:00                   ` Matthew Heaney
1998-01-14  0:00                     ` Stephen Leake
1998-01-24  0:00                       ` Matthew Heaney
1998-01-15  0:00                     ` Anonymous
1998-01-24  0:00                       ` Matthew Heaney
1998-01-24  0:00                         ` Martin M Dowie
1998-01-24  0:00                           ` Pred Nick Roberts
1998-01-25  0:00                           ` Distinguishing type names from other identifiers Matthew Heaney
1998-01-24  0:00                         ` Martin M Dowie
1998-01-15  0:00                   ` Aaro Koskinen
1998-01-17  0:00                     ` Martin M Dowie
1998-01-17  0:00                       ` Martin M Dowie
1998-01-25  0:00                       ` Matthew Heaney
1998-01-25  0:00                         ` Brian Rogoff
     [not found]                         ` <n5rs5FAStOz0Ew2+@dowie-cs.demon.co.uk>
1998-01-26  0:00                           ` Brian Rogoff
1998-01-27  0:00                             ` Martin M Dowie
1998-01-27  0:00                               ` Brian Rogoff
1998-01-27  0:00                                 ` Matthew Heaney
1998-01-28  0:00                                   ` Brian Rogoff
1998-01-28  0:00                                     ` Matthew Heaney
1998-01-29  0:00                                       ` Brian Rogoff
1998-01-30  0:00                                     ` Mats Weber
1998-01-28  0:00                                 ` Martin M Dowie
1998-01-11  0:00     ` Two simple language questions (plural types) Brian Rogoff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox