comp.lang.ada
 help / color / mirror / Atom feed
From: Richard Riehle <richard@adaworks.com>
Subject: Re: Let's change semantics of "use type"
Date: Sun, 17 Nov 2002 17:25:51 -0800
Date: 2002-11-18T01:18:26+00:00	[thread overview]
Message-ID: <3DD8419F.97C1A8@adaworks.com> (raw)
In-Reply-To: 3dcb8347$0$299$bed64819@news.gradwell.net

Victor Porton wrote:

> I am suggesting (for the next Standard) to change the semantics of "use
> type" so that it would make visible not only primitive _operators_, but
> all primitive _operations_.
>

Snipped the explanatory text.

We should be cautious about adding features to the Ada
language that will dilute its essential power.   We should
be wary of trying to make Ada look like something else
in pursuit of a potentially ephemeral popularity.  Ada is
what it is:  a language designed to enable the compiler to
detect the maximum number of errors as early in the
development process as possible and to continue catching
errors during execution and over the full life-cycle of the
maintenance process.

Since Dr. Dewar has chosen to suspend his contributory
edification to comp.lang.ada for a while, it is probably
worthwhile to recall one of his most memorable and most
important admonishments about Ada versus other programming
languages.

       "Ada is meant to be more readable than writeable."

A corollary to this is that Ada is intended to be more traceable
than writeable.   Anyone who has had the entertaining experience
of slogging through pages of C or C++ code in search of (yes,
I know there are tools for this) some function or variable knows
the importance of this.

I am not a big fan of use type.   Frankly, I still believe that, for
really well-engineered software, the renaming of the operator
is still a good practice when there is only one.   As an alternative,
renaming the exact operators needed in a child package and
using that is better than a use type clause.

Dot notation serves a very useful purpose.  So does named
association.    In production code on weapon systems, both
are essential.

Toy programs and small programs don't require this kind of
rigor.  Programs that are long-lived and on which we expect
a lot of maintenance do benefit from dot notation.   While it
is more and more common to create software with a brief
lifetime in the Internet world,  this is not so common in the
large-scale software world.



Richard Riehle






  parent reply	other threads:[~2002-11-18  1:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-08  9:20 Let's change semantics of "use type" Victor Porton
2002-11-08 12:01 ` Adrian Hoe
2002-11-08 13:38 ` Robert A Duff
2002-11-08 20:52   ` Randy Brukardt
2002-11-08 18:12 ` Victor Porton
2002-11-09 15:20   ` Robert A Duff
2002-11-11  5:28 ` Victor Porton
2002-11-11 15:22   ` Robert A Duff
2002-11-11 15:59 ` Ted Dennison
2002-11-12  8:24   ` R. Tim Coslet
2002-11-12 15:39     ` Ted Dennison
2002-11-12 18:18       ` Preben Randhol
2002-11-12 17:29 ` Victor Porton
2002-11-12 17:32 ` Victor Porton
2002-11-18  1:25 ` Richard Riehle [this message]
2002-11-19  4:13 ` Victor Porton
replies disabled

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