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: tmoran@bix.com
Subject: Re: Distinguishing type names from other identifiers
Date: 1998/01/14
Message-ID: <69iq42$ukn@lotho.delphi.com>#1/1
X-Deja-AN: 315892089
Organization: Delphi Internet Services
Newsgroups: comp.lang.ada
Date: 1998-01-14T00:00:00+00:00
List-Id:
In <884736089.2104295427@dejanews.com> Adam Beneschan said:
> best to use a boring suffix like _Type. The small advantage to this
> is that it may make your names easier to remember. If you use _Type
> ...
> type: "Now, let's see, did I call this one _Number, or _Of_Day, or
> _Of_Hour, or what?" leading to potential errors such as the one Nick
Not a "small" advantage at all! Maintenance programmers should be
able to read the code fast and without being led into
misunderstanding. A consistent pattern like "_Type" or "_T" or
plural or whatever aids this (though the example of English shows
that the human brain can deal with a limited amount of irregularity
and pure memorization, like "Integer" as a type name). Then he
should be able to write new code quickly and correctly, without have
to look up hard-to-remember spellings and with a very low
probability that he guessed wrong.