comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: Distinguishing type names from other identifiers
Date: 1998/01/25
Date: 1998-01-25T00:00:00+00:00	[thread overview]
Message-ID: <Pine.BSF.3.96.980125111454.27400A-100000@shell5.ba.best.com> (raw)
In-Reply-To: mheaney-ya023680002501980906220001@news.ni.net


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






  reply	other threads:[~1998-01-25  0:00 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-07  0:00 Two simple language questions Chip Richards
1998-01-07  0:00 ` Dale Stanbrough
1998-01-07  0:00 ` Matthew Heaney
1998-01-10  0:00   ` Two simple language questions (plural types) Michael F Brenner
1998-01-10  0:00     ` Robert Dewar
1998-01-10  0:00       ` Matthew Heaney
1998-01-10  0:00         ` Robert Dewar
1998-01-12  0:00         ` Anonymous
1998-01-12  0:00           ` Matthew Heaney
1998-01-12  0:00             ` Brian Rogoff
1998-01-13  0:00               ` Robert Dewar
1998-01-13  0:00                 ` Distinguishing type names from other identifiers Nick Roberts
1998-01-13  0:00                   ` Matthew Heaney
1998-01-14  0:00                     ` Stephen Leake
1998-01-24  0:00                       ` Matthew Heaney
1998-01-15  0:00                     ` Anonymous
1998-01-24  0:00                       ` Matthew Heaney
1998-01-24  0:00                         ` Martin M Dowie
1998-01-24  0:00                         ` Martin M Dowie
1998-01-24  0:00                           ` Pred Nick Roberts
1998-01-25  0:00                           ` Distinguishing type names from other identifiers Matthew Heaney
1998-01-15  0:00                   ` Aaro Koskinen
1998-01-17  0:00                     ` Martin M Dowie
1998-01-17  0:00                       ` Martin M Dowie
1998-01-25  0:00                       ` Matthew Heaney
1998-01-25  0:00                         ` Brian Rogoff [this message]
     [not found]                         ` <n5rs5FAStOz0Ew2+@dowie-cs.demon.co.uk>
1998-01-26  0:00                           ` Brian Rogoff
1998-01-27  0:00                             ` Martin M Dowie
1998-01-27  0:00                               ` Brian Rogoff
1998-01-27  0:00                                 ` Matthew Heaney
1998-01-28  0:00                                   ` Brian Rogoff
1998-01-28  0:00                                     ` Matthew Heaney
1998-01-29  0:00                                       ` Brian Rogoff
1998-01-30  0:00                                     ` Mats Weber
1998-01-28  0:00                                 ` Martin M Dowie
1998-01-12  0:00           ` Two simple language questions (plural types) Brian Rogoff
1998-01-11  0:00     ` Brian Rogoff
1998-01-07  0:00 ` Two simple language questions Robert Dewar
1998-01-07  0:00 ` Tucker Taft
  -- strict thread matches above, loose matches on Subject: below --
1998-01-13  0:00 Distinguishing type names from other identifiers Adam Beneschan
1998-01-14  0:00 ` Brian Rogoff
1998-01-15  0:00   ` Michael F Brenner
1998-01-15  0:00     ` Nick Roberts
1998-01-16  0:00       ` Robert Dewar
1998-01-16  0:00         ` Michael F Brenner
1998-01-16  0:00           ` Robert Dewar
1998-01-16  0:00             ` Brian Rogoff
1998-01-17  0:00               ` nabbasi
1998-01-18  0:00                 ` Robert Dewar
1998-01-16  0:00             ` Robert Dewar
1998-01-21  0:00           ` Philip Brashear
1998-01-20  0:00         ` Benoit Jauvin-Girard
1998-01-20  0:00           ` Robert Dewar
1998-01-14  0:00 tmoran
1998-01-14  0:00 ` Robert Dewar
1998-01-14  0:00   ` Brian Rogoff
1998-01-14  0:00     ` nabbasi
1998-01-15  0:00       ` Brian Rogoff
1998-01-25  0:00 tmoran
1998-01-25  0:00 ` Brian Rogoff
1998-01-26  0:00   ` Nick Roberts
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox