comp.lang.ada
 help / color / mirror / Atom feed
From: Richard Riehle <richard@adaworks.com>
Subject: Re: Where have all the Architects gone?
Date: Fri, 29 Mar 2002 14:02:29 -0800
Date: 2002-03-29T22:01:37+00:00	[thread overview]
Message-ID: <3CA4E474.A8742B8E@adaworks.com> (raw)
In-Reply-To: a82fmf$cdn$1@slb6.atl.mindspring.net

Michael Feathers wrote:

> "Richard Riehle" <richard@adaworks.com> wrote
> > If compile-time checking were restricted to ensurring the
> > conformance static types, it would be of minimal value.
> > When adding to that static type checking other kinds of
> > compile-time checks,  it becomes more useful and more
> > robust.
>
> Richard, what are the other checks that you are talking about?

I will give just one out of many other examples.

Ada allows something we call access to subprogram as well
as access to declared object.     In other languages this is also
permitted using something called pointers.    With Ada, such
accesses are under strict rules that prevent dangling references,
references that might be out of scope, etc.    Although this is
closely-coupled with the type system, it is slightly beyond
the type system.

Let me give another, one of my favorites because it is the source
of more frustration for programmers new to to Ada than any
other thing:   strict separation of scope and visibility.   In Ada,
no entity is directly visible even when it is in scope.   I realize
some other languages support a modest level of checking on
this, but Ada takes it to what some regard as an absurd extreme.

That extreme has helped me avoid some really stupid errors over
the years.

Another example is something called named association.   When
making subprogram (function and procedure) calls,   creating
instances of generic templates, or declaring constrained objects
from unconstrained types,  one may name the formal parameter
and explicitly associate it with the actual parameter.   This makes
for really good documentation of delivered source code.   It is
especially useful when on has a routine in which some of the
parameters have default values.

I could give dozens of examples.   They almost all have something
to do with the type system, but extend well beyond what one would
think of as simple type checking.

Richard Riehle




           reply	other threads:[~2002-03-29 22:02 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <a82fmf$cdn$1@slb6.atl.mindspring.net>]
replies disabled

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