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,63a41ccea0fc803a X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: Naming of Tagged Types and Associated Packages Date: 1998/07/29 Message-ID: #1/1 X-Deja-AN: 375842997 Sender: matt@mheaney.ni.net References: <6pdhfo$1br$1@platane.wanadoo.fr> <6pi0pf$df8$1@nnrp1.dejanews.com> <6pirk1$iar$1@nnrp1.dejanews.com> <6pknai$qst$1@nnrp1.dejanews.com> <6pl5rh$elr$1@nnrp1.dejanews.com> NNTP-Posting-Date: Tue, 28 Jul 1998 18:32:11 PDT Newsgroups: comp.lang.ada Date: 1998-07-29T00:00:00+00:00 List-Id: dennison@telepath.com writes: > A very typical example: I have a command that gets passed to a routine for > processing. The standard says it should be named Command_Type. It is > implemented with several "data" fields and an enumeration field specifing > what the actual command is (what "type" of command it is). The natural name > for that is Command_Type. Under the naming convetion, it becomes > Command_Type_Type. Although I don't use the _Type convention (it should be used only for "static polymorphism," as it is in the RM), you can get around the problem you describe by naming the type "Command_Kind." This avoids any potential ambiguity about whether it's a command or just a kind of command. > I've worked on a couple of programs where the lead engineer got the coding > standards written so that putting "_type" on the end of every type was > specifically *forbidden*. Give that guy a medal for doing the smart thing. The types in the RM aren't named using _Type, so why do it that way in your code?