comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Beware: Rep spec on an enumeration type ...
Date: 1997/12/12
Date: 1997-12-12T00:00:00+00:00	[thread overview]
Message-ID: <dewar.881903209@merv> (raw)
In-Reply-To: gwinn-1112972020500001@dh5055146.res.ray.com


Joe said

<<Green Hills informs me that unnamed Ada vendors have been misusing my 5
  December 1997 posting "Beware: Rep spec on an enumeration type causes code
  explosion" (on newsgroup "comp.lang.ada") to gain unfair competitive
  advantage, in effect claiming that my posting proves that the Green Hills
  Ada95 compiler is relatively immature, that only Green Hills has such
  problems, etc.  I very much disagree with this interpretation.  My
  interpretation follows.>>

It is a silly and risky thing for vendors to jump on one particular difference
like this, and claim that it represents a general state of things. As Joe
says in his message, every compiler has particular problem areas. Yes, sure
salesmen go around seizing on such things, and I suppose it must work in some
cases or why would they do it? For example, we know of a case where one
particular program did not compile on GNAT, but compiled using compiler X.
The salesman for X showed this off as an example of the supposed "immaturity"
of GNAT -- one slight glitch -- GNAT happened to be right, and this was in
fact a long standing bug in compiler X :-)

You will always be able to find relative weaknesses and strengths when
comparing any two compilers. In a benchmark of GNAT against a compiler
that has been around for a while, the performance was generally comparable
with a few exceptions. A salesman could focus on one line in such a bench
mark result "Look here, GNAT is ten times slower on this program than xxx".
Of course a GNAT salesman (if there were such a beast :-) could pick another
test and say exactly the opposite. Both are true statements, neither is
helpful.

I actually think that more important than whether glitches exist is the
support a vendor gives in helping you find and fix glitches. To me, one
of the nice things about the specific discussion of enumeration types was
the note from Intermetrics that the next version of the compiler would
indeed fix the failure to recognize the confirming rep clause as a special
case. It's that kind of responsiveness that users really need, and in this
case will get.

<<It does nobody any good to allow Ada's reputation to be damaged by
  allowing one Ada customer after another to blunder into such well-known
  beartraps.  Most customers are domain experts, not language experts.
  Telling them after the fact that they should have known better just makes
  them angrier and angrier, and drives them away.>>

Well I must say this giant population of angry Ada users who don't know
what they are doing must either be smaller than Joe thinks, or they must
not be using GNAT :-)

Seriously, I think Joe way overstates the problem here. Perhaps his shop has
just had bad luck, but I think the kind of problem he worries about is a
relatively minor issue in the overall success picture of the use of Ada.
You do not have to be a language expert to have the background to have a
feeling for many of these issues. A basic graduate course in programming
language design and compiler techniques, should be quite adequate, the
sort of education that any CS graduate should have. If you have an entire
project with no one with this kind of background, then I think that is
definitely asking for trouble!

That being said, there are definitely some areas where Joe's wish for some
standardized advice would be useful. For example, all Ada programmers should
understand the two models of implementing variant records with default
discriminant values, and all Ada programmers should be aware of the 
consequences of using controlled types.

Robert Dewar
Ad Core Technologies






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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-11  0:00 Beware: Rep spec on an enumeration type Joe Gwinn
1997-12-12  0:00 ` Robert Dewar [this message]
1997-12-11  0:00   ` Matthew Heaney
1997-12-12  0:00   ` Joe Gwinn
1997-12-13  0:00     ` Robert Dewar
1997-12-15  0:00       ` Joe Gwinn
1997-12-16  0:00         ` Robert Dewar
1997-12-19  0:00           ` Dale Stanbrough
1997-12-15  0:00     ` Dale Stanbrough
1997-12-17  0:00       ` Dale Stanbrough
replies disabled

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