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,2afac1a4161c7f35 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Two simple language questions (plural types) Date: 1998/01/12 Message-ID: #1/1 X-Deja-AN: 315371165 References: <199801121523.QAA06527@basement.replay.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: 884644173 21893 bpr 206.184.139.132 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-01-12T00:00:00+00:00 List-Id: On Mon, 12 Jan 1998, Matthew Heaney wrote: > Perhaps I chose a bad example. I occasionally use a definate article on > object names, I mostly do not. > > I agree also that one does not require the "_Type" suffix on type names. > The designator _Type doesn't add any more value to the name, since it > appears on the right-hand side of a declaration, and therefore I already > know it's a type. But you have to solve the problem of giving objects a > different name than the type, because they share the same namespace (this > is not an issue in Eiffel). If you have a type Color_Type, you can name the variable Color. While you can claim that distinguishing types is redundant due to their position, it is IMO a helpful redundancy. Just remember, to an ML programmer, almost all of the type declarations in Ada are redundant :-). I think separating the namespaces and allowing Color : Color; is a bit too much for me, but I suppose Eiffel programmers get used to it and so could I. All of this is preference; just remember a few months ago that people were flaming Michael Feldman for his use of all caps keywords in his (otherwise excellent :-) books. > In fact, I think the reason the _Type convention is a debate in the Ada > community is because the file type declared in Text_IO was named > > type File_Type is limited private; > > To me, this is the one thing the designers got wrong, because they're not > consistant with other declarations in the RM. The file types should have > been named I guess I think all of the type names should have been lexically distinguished from non-type names, so I think this is an even bigger mistake by far than you! While I don't like your naming conventions, I have to say I admire your approach in trying to come up with a simple set of rules that retains consistency with the names of the predefined types. I definitely prefer your approach to the use of plurals to distinguish types, but I doubt that a uniform naming convention will be adopted by Ada programmers anytime soon. -- Brian