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: Distinguishing type names from other identifiers Date: 1998/01/25 Message-ID: #1/1 X-Deja-AN: 319173143 References: <199801121523.QAA06527@basement.replay.com> <01bd2078$a449b460$41fd82c1@xhv46.dial.pipex.com> <6v0LMGAjwIw0Ews0@dowie-cs.demon.co.uk> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: 885757188 21721 bpr 206.184.139.132 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-01-25T00:00:00+00:00 List-Id: On Sun, 25 Jan 1998, Matthew Heaney wrote: > > Be consistant with the style used in the RM. If you ever have a question > about how to name something, then flip through the RM (or ask me :-) to see > how the RM does it, and name it that way. Don't make up a convention > because you think it's more "oo-like." I disagree. Slavish consistency with the RM naming conventions is not in and of itself a virtue, nor a vice. I agree that being "more OO" is an odd criteria for a naming convention, much worse than RM consistency, but that doesn't mean that the RM is our only guide. As Jean Pierre Rosen pointed out, in another thread, we'll almost always end up designing our own types anyways, so some convention which makes it clear that we aren'r using "built-in" Ada types has some (arguably e, of course) merits. > > So the answer is: No, do not use the indefinate article to name types or > objects. That convention does not appear in the RM, so its use in your > code would be inconsistant with the RM. > > The reason we Ada programmers even have this debate about the _Type > convention, is because the file type in Text_IO was named File_Type. Had > the designers named it Text_File, which is how the abstraction is described > in the Rationale (see Text Files, Section 16.5; see also Indexed and > Sequential Files, section 16.4), we wouldn't be having this debate at all, > and very likely it wouldn't have even occurred to anyone to use _Type for > type names. I've seen similar conventions used in other languages, and I've liked them. I've seen this convention used in some Ada textbooks, notably Cohen's , which, BTW, is still my favorite. > This is the argument against _Type as a suffix. Because it's a noise word, > it doesn't add any new information. Redundancy is not in and of itself bad. Especially if it makes the code clearer to the reader. As I pointed out before, explicit types are mostly redundant too.. -- Brian