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.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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: clines@delete_this.airmail.net (Kevin Cline) Subject: Re: Warning: Religious naming convention discussion :-) [was: assign help!!] Date: 1997/05/09 Message-ID: <2B7896AAF5813C74.8F68EC25E241D79E.597694DA2A962A51@library-proxy.airnews.net>#1/1 X-Deja-AN: 240384228 References: <5kjvcv$evt@news.cis.nctu.edu.tw> <5kn8ko$jcc@top.mitre.org> <1997May7.201035.2439@nosc.mil> <33727EEA.2092@sprintmail.com> X-Orig-Message-ID: <3375af5f.2479863@news.airmail.net> Organization: INTERNET AMERICA NNTP-Proxy-Relay: library.airnews.net Newsgroups: comp.lang.ada Date: 1997-05-09T00:00:00+00:00 List-Id: "John G. Volan" wrote: >Charles H. Sampson wrote: > >I have now come around to accept Norman Cohen's approach: An unmarked >noun should be reserved for an object, e.g.: >"Target.Location.Latitude". The name of the type should be the one that >gets marked, and what better universal marker for "typeness" than >"_Type"? e.g.: > > Target : Target_Type; > Location : Location_Type; > Latitude : Latitude_Type; > Absolutely agree. After I switched from C to Ada, and could no longer use case to distinguish between instances and types, I looked at a lot of code, including Booch's original Ada components, before settling on the _type suffix, for all of the reasons Charles gave. Reading code like: The_Node.Left := Into_The_Tree.Root gave me a headache. It's hard to solve this problem in any way similar to natural language because natural languages (at least all the ones that I'm familiar with) use the same word for both a category and an instance of the category, relying on the context to disambiguate.