comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: Two simple language questions (plural types)
Date: 1998/01/12
Date: 1998-01-12T00:00:00+00:00	[thread overview]
Message-ID: <Pine.BSF.3.96.980112140520.25032A-100000@shell5.ba.best.com> (raw)
In-Reply-To: mheaney-ya023680001201981007080001@news.ni.net


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





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

Thread overview: 39+ 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 ` Tucker Taft
1998-01-07  0:00 ` Dale Stanbrough
1998-01-07  0:00 ` Robert Dewar
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 [this message]
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                           ` Pred Nick Roberts
1998-01-25  0:00                           ` Distinguishing type names from other identifiers Matthew Heaney
1998-01-24  0:00                         ` Martin M Dowie
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
     [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
replies disabled

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