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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,63a41ccea0fc803a X-Google-Attributes: gid103376,public From: "John G. Volan" Subject: Re: Naming of Tagged Types and Associated Packages Date: 1998/09/06 Message-ID: <35F2AEEA.94D37DFF@sprintmail.com>#1/1 X-Deja-AN: 388428274 Content-Transfer-Encoding: 7bit References: <6qfp80$p0u$1@nnrp1.dejanews.com> <35CD0A8E.21D64380@sprintmail.com> <35CEBAAF.B9B82820@sprintmail.com> <35F0CAF2.9B447FD2@sprintmail.com> X-Posted-Path-Was: not-for-mail Content-Type: text/plain; charset=us-ascii X-ELN-Date: Sun Sep 6 08:49:06 1998 Organization: EarthLink Network, Inc. Mime-Version: 1.0 Reply-To: johnvolan@sprintmail.com Newsgroups: comp.lang.ada Date: 1998-09-06T00:00:00+00:00 List-Id: Matthew Heaney wrote: > > My philosophy is to use the name _Type only as a last resort, as it has > a sort of generic quality to it. Funny, I'd say its precisely this quality that should make _Type the *first* resort! :-) It's so generally applicable as a type-marking suffix one might as well use it everywhere... > That sometimes turns out to be useful, > as in the example above. Some guys name generic formal types _Type, for > exactly that reason. I'd say, don't treat generic formal types any differently than normal types: Mark 'em all with "_Type"! One nice feature of Cohen style is that it results in a clearly-readable distinction between generic formal parameter passing and subprogram parameter passing, which otherwise are syntactically identical (in Ada): -- Generic formal parameter passing: package Doctor_Lists is new Lists (Item_Type => Doctors.Doctor_Type); -- it's clear that the parameter -- being passed is a _type_ ... Doctor_List : Doctors_Lists.List_Type; Doctor : Doctors.Doctor_Type; ... Doctor_Lists.Append (List => Doctor_List, Item => Doctor); -- it's clear that the parameters -- being passed are _objects_ -- indexing description: "Signatures for John G. Volan" self_plug: "Ex Ada guru", "Java 1.1 Certified", "Eiffelist wannabe" two_cents: "Java would be even cooler with Eiffel's assertions/DBC, % %generics, true MI, feature adaptation, uniform access, % %selective export, expanded types, etc., etc..." class JOHN_VOLAN_SIGNATURE inherit SIGNATURE invariant disclaimer: not (opinion implies employer.opinion) end -- class JOHN_VOLAN_SIGNATURE