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,e55245590c829bef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Beginners question: Compound types, how-to? References: <86wroy58ff.fsf@gareth.avalon.lan> <86pqup5xfy.fsf@gareth.avalon.lan> <86y69d3rec.fsf@gareth.avalon.lan> <82lj5c5ecm.fsf@stephe-leake.org> <79ed13b7-4c55-40c4-9f66-e30ed94e5591@e14g2000yqe.googlegroups.com> <4cd0b0ed$0$6775$9b4e6d93@newsspool3.arcor-online.net> Date: Wed, 03 Nov 2010 08:18:46 -0400 Message-ID: <82vd4e4n2x.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (windows-nt) Cancel-Lock: sha1:O4SvV3hEZ57+TV4YlHdbFGlbPAs= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: f1b064cd150b9e029e66116553 Xref: g2news1.google.com comp.lang.ada:15161 Date: 2010-11-03T08:18:46-04:00 List-Id: Georg Bauhaus writes: > On 11/2/10 9:59 PM, Britt Snodgrass wrote: >> On Nov 2, 2:02 pm, Jeffrey Carter >> wrote: >>> On 11/02/2010 01:17 AM, Stephen Leake 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 names is >>> a waste of time are clearly not S/W engineers. >>> >> >> Bah. Pick a good type name and then suffix it with "_Type". That makes >> it an even better type name. > > Arguing from suitably chosen context about the suffix > being helpful (and thus implying that the language is not > sufficiently well equipped for this kind of help) one might > be tempted to write > > procedure Attack_Proc (Weapon_Parm_Name : Weapon_Type); The reason we need different names for the parameter and the type is because they are not in separate name spaces in Ada. So it is true that "the language is not sufficiently well equipped for this kind of help". That's something else the "no _Type" side does not want to admit. Procedure names don't have that problem, since they can be overloaded. So the only place a "pure syntax noise" solution is needed in on type names. One characteristic of religious arguments is putting up straw-man arguments like this. > Sill, a different grammar(!) might lead to better visual > distinction. (Which words are types' names etc.) > A grammatical approach seems a lot better to me than > injecting a mechanical sublanguage into identifiers!!! If we are designing a new language, yes. We don't get to change the grammar of Ada. -- -- Stephe