comp.lang.ada
 help / color / mirror / Atom feed
From: "Beard, Frank" <beardf@spawar.navy.mil>
To: "'comp.lang.ada@ada.eu.org'" <comp.lang.ada@ada.eu.org>
Subject: RE: Why not combine Ada and C++?
Date: Tue, 23 Oct 2001 18:03:17 -0400
Date: 2001-10-23T18:03:17-04:00	[thread overview]
Message-ID: <mailman.1003874733.1432.comp.lang.ada@ada.eu.org> (raw)

-----Original Message-----
From: Hyman Rosen [mailto:hyrosen@mail.com]

> And as far as causing confusion, Ada already allows the same name to 
> mean multiple things. Quoting from Barnes,
> 
>	type Colour is (Red, Amber, Green);
>	type Stone is (Amber, Beryl, Quartz);
>
> So when you see Amber in the code, you don't instantly know what it 
> refers to - you have to examine the context. Reading it aloud doesn't 
> help either. I fail to see why this is any different than allowing 
> identifiers to differ only in case.

Yes, but the right variable names make the context obvious, as in:

	Traffic_Light_Color := Amber;
or
	Stone_Formation := Amber;

Then the context is immediately clear, but the following isn't:

	X := Amber;
and
	x := Amber;

To me, relying on case sensitivity clouds the context.  Sure, you can
get used to it, but it's more things to keep up with, and requires
more documentation.

However, as a minor exception to that, we do use all uppercase to
indicate constants, as in MAXIMUM_DEVICES.

Frank



             reply	other threads:[~2001-10-23 22:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-23 22:03 Beard, Frank [this message]
2001-10-23 23:13 ` Why not combine Ada and C++? Larry Kilgallen
  -- strict thread matches above, loose matches on Subject: below --
2001-10-24  0:02 Beard, Frank
2001-10-15  8:21 Mike Meng
2001-10-15 10:29 ` Larry Kilgallen
2001-10-15 10:36 ` Robert*
2001-10-15 11:15 ` Stephen Cole
2001-10-15 14:39   ` Marin David Condic
2001-10-15 16:17     ` Alfred Hilscher
2001-10-15 16:35       ` Marin David Condic
2001-10-15 20:15         ` Robert*
2001-10-15 21:27           ` Marin David Condic
2001-10-15 22:50           ` Jeffrey Carter
2001-10-18 19:53             ` Simon Wright
2001-10-21  5:54               ` AG
2001-10-15 17:41   ` Stephen Cole
2001-10-15 18:27     ` tmoran
2001-10-15 20:24       ` Wes Groleau
2001-10-15 20:03     ` Wes Groleau
2001-10-15 19:47   ` Wes Groleau
2001-10-23  5:39     ` Hyman Rosen
2001-10-23  6:11       ` Richard Riehle
2001-10-15 19:28 ` Baugereau
2001-10-15 20:05   ` Ted Dennison
2001-10-16  7:38     ` Martin Dowie
2001-10-16 11:44       ` Pascal Obry
     [not found] ` <01c155a0$7dd31b80$1b7af2c3@akzvbymr>
2001-10-15 20:02   ` Ted Dennison
2001-10-15 20:55   ` Adrian Knoth
2001-10-15 22:15   ` Eric Merritt
2001-10-15 22:42   ` tmoran
     [not found]     ` <01c15665$dc2e6c00$9b29e8d4@akzvbymr>
2001-10-16 17:48       ` Ted Dennison
2001-10-16 18:04       ` Larry Kilgallen
2001-10-16 23:01         ` tmoran
2001-10-16 18:51       ` Marin David Condic
replies disabled

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