comp.lang.ada
 help / color / mirror / Atom feed
* Re: Question about Ada expressions
@ 1989-10-12 23:37 Karl Nyberg
  1989-10-15 20:35 ` Scott Simpson
  0 siblings, 1 reply; 7+ messages in thread
From: Karl Nyberg @ 1989-10-12 23:37 UTC (permalink / raw)


I had a friend call yesterday after spending five hours trying to figure out
why some C code didn't work based on this expression:

	if (variable & MASK == VALUE)

He mistook the rules of precedence, just as Robert Firth expressed it in his
response.  The K&R book explains this reasoning:

	Note that the precedence of the bitwise logical operators &, ^ and |
	falls below == (test for equality) and !=  (test for inequality).
	This implies that bit-testing expressions like

		if ((x & MASK) == 0) ...

	must be fully parenthesized to give proper results.  [p. 49]

Seems like it was kind of the Ada designers to preclude this from the
language.  Getting an error during compile time would have saved my friend
immense difficulty.  Getting a manual might have helped him, too...

-- Karl --

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Re^2: Ada 9X objectives
@ 1989-10-06 12:50 Robert Munck
  1989-10-08 17:07 ` William Thomas Wolfe, 2847 
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Munck @ 1989-10-06 12:50 UTC (permalink / raw)



I think that many of the participants in this discussion thread are
missing an important point:  the Ada effort is NOT primarily concerned
with the state of the art in programming languages, but rather that
of large-scale software engineering.

These are two very different things, and it is to be expected that the
programming language chosen would be different.  For example, language
stability is an important characteristic of this kind of s/w engineering;
the 10-year language upgrade period is on the same order of magnitude
(or even a bit low) as the time required for a big software project,
either DOD or commercial.  Ada is intended to reduce life-cycle costs,
and changing the language every few years would have a large negative
effect on that.

What we have here is a failure of communication between research and
practicality.  Universities and commercial research centers have very
little chance for experience in software projects that require hundreds
of programmer-years with large geographic and temporal distributions.
It is quite irrelevant to proclaim the powers of brand-new languages
until they have been used successfully in such large projects.  Has
there been a C++ development of 500,000 lines or more that has become
a product in some sense and has been widely used?  One that has been
developed by a prime/sub-contractors arrangement of a half-dozen
companies and passed on to another such group for maintenance?  Well,
Ada can't claim many such either, but it was designed for that
kind of situation.

I'd suggest that language theorists commenting on Ada first consider
the extent of their own experience with "real-world," large-scale
programming projects.  Ada can certainly be discussed as a language
independent of such concerns, but the entire DoD Ada effort can not.
                 -- Bob <Munck@MITRE.ORG>, linus!munck.UUCP
                 -- MS Z676, MITRE Corporation, McLean, VA 22120
                 -- 703/883-6688

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

end of thread, other threads:[~1989-10-15 20:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1989-10-12 23:37 Question about Ada expressions Karl Nyberg
1989-10-15 20:35 ` Scott Simpson
  -- strict thread matches above, loose matches on Subject: below --
1989-10-06 12:50 Re^2: Ada 9X objectives Robert Munck
1989-10-08 17:07 ` William Thomas Wolfe, 2847 
1989-10-11 18:13   ` Dick Dunn
1989-10-11 22:14     ` Question about Ada expressions Perry Schmidt
1989-10-12 10:56       ` STEPHEN D. STRADER
1989-10-12 12:15       ` Robert Firth
1989-10-12 22:07       ` stt
1989-10-13 14:38       ` horst

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