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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2078dddcdcd8d83 X-Google-Attributes: gid103376,public From: wemagor@sym1.cca.rockwell.com (Wayne Magor) Subject: Re: Warning: Religious naming convention discussion :-) [was: assign help!!] Date: 1997/05/16 Message-ID: <5li43j$ur3@castor.cca.rockwell.com>#1/1 X-Deja-AN: 242853992 Distribution: world References: <5kjvcv$evt@news.cis.nctu.edu.tw> <5kn8ko$jcc@top.mitre.org> <1997May7.201035.2439@nosc.mil> <33727EEA.2092@sprintmail.com> <5kuf1j$17vi@uni.library.ucla.edu> <3373666A.31DFF4F5@spam.innocon.com> Organization: Rockwell Collins - Avionics Reply-To: No@Junk.Mail Newsgroups: comp.lang.ada Date: 1997-05-16T00:00:00+00:00 List-Id: Jeff Carter writes: >Jay Martin wrote: >> >> "John G. Volan" writes: >> ... >> >I only wish the original designers of Ada83 had clued into this style >> >from the start. I find myself wishing Ada95 looked more like this: >> >> > Integer : Integer_Type; >> > Natural : Natural_Type; >> > Float : Float_Type; >> > Boolean : Boolean_Type; >> > Character : Character_Type; >> > String : String_Type; >> > Duration : Duration_Type; > >But it wastes fewer characters than the equally ugly _Type. Using _Type *is* ugly, but we use it fairly often anyway. Requiring it in coding standards is a very bad idea. Sure, it is mechanical, but it does not allow the very natural Units package we typically use. Example: Altitude : Units.Feet; Latitude : Units.Radians; Rate : Units.Hertz; It's pretty important to know that Altitude is in feet and not nautical miles or meters. It's also pretty important to know what is in Degrees and what is in Radians. This is the most straightforward and elegant solution, IMHO. >Numeric types: _Value, _Count, _Range >Enumeration types: _Id, _Name >Array types: _Set, _List >Record types: _Group, _Data, _Info >Task types: _Agent, _Controller >Private types: _Handle These are fairly natural, I can find many examples of those exact uses in our software, however, as I stated above, requiring type names with those suffixes is not wise.