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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1b41412c7bc28c47 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s21.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Suffix _T for types found good References: <2e9ebb23-a68b-43cf-8871-febcb173f951@56g2000hsm.googlegroups.com> In-Reply-To: <2e9ebb23-a68b-43cf-8871-febcb173f951@56g2000hsm.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s21 1218049896 12.201.97.213 (Wed, 06 Aug 2008 19:11:36 GMT) NNTP-Posting-Date: Wed, 06 Aug 2008 19:11:36 GMT Organization: AT&T ASP.att.net Date: Wed, 06 Aug 2008 19:11:36 GMT Xref: g2news1.google.com comp.lang.ada:1472 Date: 2008-08-06T19:11:36+00:00 List-Id: amado.alves@gmail.com wrote: > I just want to offer my experience on the old issue of adding a suffix > _T to all type names. > > In my experience it is good. I disagree. _T[ype] adds no value. Consider your examples: > Index : Index_T; > procedure Proc (Index : Index_T); It is clear without the suffix that the identifiers are types. Making the effort to come up with good names is an important part of SW engineering. _T[ype] is an excuse for not thinking. I use a number of suffices for type names to allow using the best name for objects and parameters, while still adding value to the type name: Numeric types: _Value, _Index, (rarely) _Range Enumeration types (and numeric types used as IDs): _ID, _Name Access types: _Ptr, _Handle Private types: _Handle Array types: _Set, _List Record types: _Info, _Data, _Group These suffixes provide information about the kind of type and its intended usage. Of course, when a better name exists, it should be used rather than unthinkingly using one of these. On a large project with multiple developers this approach proved to be easy to use and understand. -- Jeff Carter "Sheriff murdered, crops burned, stores looted, people stampeded, and cattle raped." Blazing Saddles 35