Re: ADA Popularity Discussion Request
From: Kevin Cline (kevin.cline_at_gmail.com)
Date: 09/09/04
- Next message: Georg Bauhaus: "Re: ADA Popularity Discussion Request"
- Previous message: Georg Bauhaus: "Re: ADA Popularity Discussion Request"
- In reply to: Richard Riehle: "Re: ADA Popularity Discussion Request"
- Next in thread: Jean-Pierre Rosen: "Re: ADA Popularity Discussion Request"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 8 Sep 2004 19:52:36 -0700
"Richard Riehle" <adaworks@earthlink.net> wrote in message news:<_xl%c.431$xA1.301@newsread3.news.pas.earthlink.net>...
> Much has been said, in this forum, about the wonders of test-driven
> design in dynamically-typed languages as a benefit to on-going change
> in a program.
The original question was "Why isn't Ada more popular?" For general
non-safety critical applications, there is now some question whether
the benefits of static typing outweigh the cost. For the class of
applications you are interested in, I would want to use a language
that allowed me to most easily prove program correctness. But a
relatively small number of programmers write those applications.
> Engineering is concerned with design. Engineeering prefers, as much as
> possible, settled knowledge rather than a continual test-debug model.
> We try to get the design as close to correct early, even testing parts of
> it along the way as we build it. However, testing every aspect of the
> design is not always possible. In particular, as the deployed design
> is required to deal with the real world, it must be able to adapt itself
> to the unexpected.
>
> Let me give you an example. In am system I know something about,
> one with a large number of components, a programmer included a
> routine that had a built-in constraint (not a type constraint), in the
> form of an if ... end if statement. The constraint was cleverly
> written and the language in use was not strongly typed, so the
> programmer could use long (as in long integer) as a reasonable
> data type for his algorithmic mischief. I say mischief because
> that was what it was, a small time-bomb intended to crash the
> program long after he resigned and went on to another job.
It might be possible to build a system to fail-safe in one component
or another, but there is no software defense against buggy code,
whether introduced deliberately or inadvertently. Even if the
function returned a value in range it could have been written to
return an incorrect value for certain inputs. For a great many
applications, crashing is preferable to incorrect output.
> No amount of testing would have caught this.
No, but an inspection could have and should have.
> Experienced software designers could easily relate many more
> such stories.
I don't have much experience with sabotaging programmers, but have a
lot of experience with code that is just wrong. Some of it was Ada
code. I found out that it is extremely difficult to write code and
then test it, although coverage analysis helps. I've found that
writing tests and then coding to meet them works better. At least you
are forced to think very clearly about exactly what it is you are
trying to do before you start doing it, and you have a clear
indication of when you are done.
- Next message: Georg Bauhaus: "Re: ADA Popularity Discussion Request"
- Previous message: Georg Bauhaus: "Re: ADA Popularity Discussion Request"
- In reply to: Richard Riehle: "Re: ADA Popularity Discussion Request"
- Next in thread: Jean-Pierre Rosen: "Re: ADA Popularity Discussion Request"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|