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: Brian Rogoff Subject: Re: Two simple language questions (plural types) Date: 1998/01/12 Message-ID: #1/1 X-Deja-AN: 315371164 References: <199801121523.QAA06527@basement.replay.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: 884628746 15223 bpr 206.184.139.132 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-01-12T00:00:00+00:00 List-Id: On Mon, 12 Jan 1998, Anonymous wrote: > 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. You saying it doesn't make it so. At least provide a reference for this assertion. > 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 find it amazing that you can divine someone's competence in coming up with type names based on whether or not they use the same style you do! You are also obviously wrong, the _Type adds the information that the lexical entity is a type. "Integer" or "List" could just as easily be a variable name as a type name (well, Integer is taken...) so adding some bit of information to distinguish them doesn't seem that bad to me. Some languages (Dylan, EuLisp) use lexical conventions to distinguish type names, so Integer and Tree would be and . FWIW, I think Norman Cohen's book uses and _ convention frequently in its examples. -- Brian