comp.lang.ada
 help / color / mirror / Atom feed
From: <adaworks@sbcglobal.net>
Subject: Re: Mutations and type usage in Ada
Date: Sun, 19 Feb 2006 04:13:25 GMT
Date: 2006-02-19T04:13:25+00:00	[thread overview]
Message-ID: <FfSJf.14862$2O6.1335@newssvr12.news.prodigy.com> (raw)
In-Reply-To: aY2If.25669$i2.16979@newsfe6-gui.ntli.net


"Derek M. Jones" <derek@_NOSPAM_knosof.co.uk> wrote in message
news:aY2If.25669$i2.16979@newsfe6-gui.ntli.net...
> All,
>
> To what extent will Ada type checking cause mutated
> programs, where some of the variables have been changed,
> to be flagged at compile time?
>
It is not entirely clear what problem you are trying to solve.
>
> Whether or not a change of variable will result in a compile
> time error will depend on the extent to which a program makes
> use of the Ada type system.  For instance, if all my variables
> have type integer then the switching them around is unlikely
> to generate a compile time message.
>
In Ada we would typically eschew the use of predefined types
for production code.  The Integer type is useful for student
and toy programs but not for serious programs.   Often, we
will specify not only the range of the type but also supply a
representation specification to define its bit size.
>
> My experience with Pascal (yes, Pascal is not Ada) was that many
> programmers would not spend the time needed to think about the
> type that needed to be created.  Perhaps some of these people have
> been sucked into Ada and managed to avoid the 'type safety' thought
> police :-)
>
What a strange phrase, "type safety thought police."

The objective, I would hope, is to produce the most dependable software
we can.   We want to solve the right problem and we want to solve it
correctly.   Further, we want to include all the controls over that solution
that will ensure it will not inadvertantly go awry during operation.

Ada provides a variety of tools for ensuring dependability.   Those tools
include type safety and visibility safety.   The language tools alone are not
sufficient for ensuring dependability.  We still need inspection by humans,
testing, and lots of other tools that are outside the language.   In the case
of Ada, correct use of the tools provided by the language, including type
safety, can help in the use of those other tools.

If you are simply concerned with writing a program according to your own
best understanding of the problem, you might use any language tool or
limited set of tools you wish.   On the other hand, if you are concerned with
an engineering view of the problem, which includes the long-term maintenance
of the solution, it is only proper to choose your tools wisely and use them
correctly.

Introducing phrases such as "type safety thought police" is both irresponsible
and silly.  It reflects a narrow view of what software engineering is about and
has the potential for leading astray those newcomers to software engineering
that need to be prepared for correct use of all the tools available to them
in their work.

Richard Riehle





      parent reply	other threads:[~2006-02-19  4:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-13 17:01 Mutations and type usage in Ada Derek M. Jones
2006-02-13 17:16 ` Larry Kilgallen
2006-02-13 18:47   ` Jeffrey R. Carter
2006-02-13 19:13     ` Mark Lorenzen
2006-02-13 20:57     ` Larry Kilgallen
2006-02-14 20:53       ` Jeffrey R. Carter
2006-02-19  4:13 ` adaworks [this message]
replies disabled

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