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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e55245590c829bef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!b19g2000prj.googlegroups.com!not-for-mail From: "Peter C. Chapin" Newsgroups: comp.lang.ada Subject: Re: Beginners question: Compound types, how-to? Date: Thu, 4 Nov 2010 06:47:56 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <86wroy58ff.fsf@gareth.avalon.lan> <86pqup5xfy.fsf@gareth.avalon.lan> <86y69d3rec.fsf@gareth.avalon.lan> <82lj5c5ecm.fsf@stephe-leake.org> NNTP-Posting-Host: 67.142.175.22 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1288878477 17036 127.0.0.1 (4 Nov 2010 13:47:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 4 Nov 2010 13:47:57 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b19g2000prj.googlegroups.com; posting-host=67.142.175.22; posting-account=nNN2XAoAAAAvavi7GAVEB_yDQjB_6tZb User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.41 Safari/534.7,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:15215 Date: 2010-11-04T06:47:56-07:00 List-Id: On Nov 2, 3:02=A0pm, Jeffrey Carter wrote: > > _Type vs "waste time thinking up other names" is a religious argument > > (guess which side I'm on?); it has never been settled before, and won't > > be settled this time. > > Those who think the essential S/W-engineering activity of choosing good n= ames is > a waste of time are clearly not S/W engineers. I guess I will jump into this discussion with my thoughts on the _Type suffix. In my view it is not noise. It is useful. It conveys the information that the name in question is the name of a type. That information is valuable. The problem is that many words in ordinary English can be used as type names identifying an entire class of objects, or as an individual object. For example the word "Weapon" that was used in some other posts. In some contexts "Weapon" refers to a type... the class of all weapons. On other contexts "Weapon" refers to a specific weapon at hand. In normal English the context is set up by the surrounding text and by the semantics of the sentence in which the words appear. That works. That can even work in a programming language where a name is "obviously" the name of a type when it is used in certain ways. However, when it comes to programming... even software engineering... I tend to prefer redundancy and explicitness. I like Ada (over some other languages) precisely because it is redundant and explicit. Thus I like the name of a type to clearly indicate that it is a type name. Using the _Type suffix does that nicely. That said, I don't use _Type universally. There are some names where it just does not seem necessary. Integer is a good example. It's a judgement call about which names are good without _Type and which are not. However, I most definitely do not think _Type is "just noise." Peter