comp.lang.ada
 help / color / mirror / Atom feed
* RE: Why not combine Ada and C++?
@ 2001-10-23 22:03 Beard, Frank
  2001-10-23 23:13 ` Larry Kilgallen
  0 siblings, 1 reply; 34+ messages in thread
From: Beard, Frank @ 2001-10-23 22:03 UTC (permalink / raw)
  To: 'comp.lang.ada@ada.eu.org'

-----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



^ permalink raw reply	[flat|nested] 34+ messages in thread
* RE: Why not combine Ada and C++?
@ 2001-10-24  0:02 Beard, Frank
  0 siblings, 0 replies; 34+ messages in thread
From: Beard, Frank @ 2001-10-24  0:02 UTC (permalink / raw)
  To: 'comp.lang.ada@ada.eu.org'

-----Original Message-----
From: Kilgallen@SpamCop.net [mailto:Kilgallen@SpamCop.net]

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

> That must make for a lot of editing when a former constant becomes
> a variable or a function call in some subsequent version.

It hasn't happened yet, but you're right, it could be a problem if
you haphazardly pick names that you might intermix as constants or
variables.  We tend to use names containing the word MAXIMUM, MINIMUM,
LIMIT, etc., for constants.  As far as changing constants to functions,
most of our constants are in the package bodies, and exported through
functions.

It was a Style Guide/Coding Standards decision made 8 years ago for
the various projects.  It hasn't come back to haunt us yet.



^ permalink raw reply	[flat|nested] 34+ messages in thread
* Why not combine Ada and C++?
@ 2001-10-15  8:21 Mike Meng
  2001-10-15 10:29 ` Larry Kilgallen
                   ` (4 more replies)
  0 siblings, 5 replies; 34+ messages in thread
From: Mike Meng @ 2001-10-15  8:21 UTC (permalink / raw)


Hi, I am a proficient C++ programmer, who also admire Ada's
reliability and power. After tasted a little Ada, I must admit that I
like it. I alway say to my friends, though C++ is a great language,
it's population is just because it's *C*++. If the most pop PL in
mid-1990s was Ada, the whole life would be much easier.

But the history is history. Though I know Ada's syntax is much clearer
and readable than C++'s, nowadays, most of programmers are familiar
with C-family languages' syntax. Some of my friends don't like Ada
just because it's not case-sensitive!

I'm an SCJP (Sun's Certificated Java Programmer), I clearly remember
what the teacher said, "Java is created with C++'s syntax and
Smalltalk's semantic". I always thought, if there is a language with
C++ syntax and Ada95's semantic, it must be very pop!

I don't know much about Ada, so I can't figure out how is the
feasibility. Please comment it.



^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2001-10-24  0:02 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-23 22:03 Why not combine Ada and C++? Beard, Frank
2001-10-23 23:13 ` 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

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