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.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1b41412c7bc28c47 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 08 Aug 2008 08:46:12 -0500 From: "Steve" Newsgroups: comp.lang.ada References: <2e9ebb23-a68b-43cf-8871-febcb173f951@56g2000hsm.googlegroups.com> <4899d2af$0$19731$4d3efbfe@news.sover.net> <0ebdf2bf-5ce6-4618-8a78-4a9ebc3f7df7@79g2000hsk.googlegroups.com> Subject: Re: Suffix _T for types found good Date: Fri, 8 Aug 2008 06:46:19 -0700 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 Message-ID: X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 24.20.111.206 X-Trace: sv3-3GIFREFz5kxt2o85S3NmpB93/J5YV5MkJVNDIfvyjHMeyjOIbIiAMyl7TvMsUZMYDQPlhW1qCTDCtuA!QUd67ReIM1i+1yIxqqQ8kRe9DM/KE7v9skZ6HOU89A1hCRLp2FMBiIcH5214Uh+jMnvL92CNV2Kh!7yxsfj6iU1cA3Bbm3yz4Ed3W9ZMjuQ== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Xref: g2news1.google.com comp.lang.ada:1547 Date: 2008-08-08T06:46:19-07:00 List-Id: "Jeffrey R. Carter" wrote in message news:Y9Imk.287972$yE1.85979@attbi_s21... > amado.alves@gmail.com wrote: >> IIRC the rationale for "index : anIndex" is that it sounds like >> English "index is an Index". Natural language syntax is a bitch! > > "Index is an index" is at best a tautology and at worst meaningless; in > other words, this approach adds no value. Yet another mindless rule to > avoid the effort of thinking up good names. > > "Index" is a poor variable name. What is it the index of? > > First_Comma : Index_Value; > Start_Position : Index_Value; > > and so on. Good names add information. Funny, with my simple example of anIndex you comment that anIndex is meaningless and go on to use Index_Value as being more informative. Your example is to simple and worthless as well. All variables contain values. Perhaps a better example is more like: lengthIndex : aLengthTableIndex; is more useful. And yes the way I read it is in the natural language way: lengthIndex is a length length table index. I've seen code that uses the a prefix on variable names. After getting used to the opposite convention it makes it hard to read. Personally I prefer the _Type and _Acc_Type suffixes. One other thing to note: Once I got used to reading and writing code using these conventions, I found: 1) It makes reading code that follows these conventions a lot easier 2) It makes reading code that does not follow these conventions harder (you get used not having to infer based on context). Regards, Steve > > -- > Jeff Carter > "To Err is human, to really screw up, you need C++!" > St�phane Richard > 63