comp.lang.ada
 help / color / mirror / Atom feed
From: "Samuel T. Harris" <sam_harris@hso.link.com>
Subject: Re: Question (was Re: How to write TYPECASE in Ada 95?)
Date: 1999/02/24
Date: 1999-02-24T00:00:00+00:00	[thread overview]
Message-ID: <36D4130E.2D476D7A@hso.link.com> (raw)
In-Reply-To: 7avc0i$cnb$1@its.hooked.net

Mike Silva wrote:
> 
> Samuel Mize wrote in message <7av52o$62g@news3.newsguy.com>...
> <...>
> >Remember, tagged types are NOT a facility for object-oriented
> >programming.  Together with other facilities in the language, they
> >support that idiom.  However, tagged types are a facility for
> >programming by extension, in a much more general form than many
> >object-oriented languages provide.
> 
> This intrigues me greatly, but being an Ada neophyte and not having that
> much OOP background in general I don't know what it means.  Would anybody
> care to offer an explanation, or point me in the direction of one.  Thanks
> much.
> 
> Mike Silva

One of the attractive attributes of Ada is that facilities
are provided without attaching some taxonomy to the facility.
Frequently, a combination of facilities are required to
match a particular paradim. While this may appear to some
as form of "weak" support for that paradim, I see it as freeing
the language from the paradim du jour. I am free to combine
language elements to suit the mind set at hand without
fighting an ingrained taxonomy within the language itself.

This also enables the language to keep the features
orthogonal to each other. Because so many features and
constructions are available, their use together many times
calls for what appear to be archane rules to protect
the system being developed. The protection is desirable,
but the orthogonality of the constructions sometimes hides
the necessity of some of the rules.

If I was doing structured programming, I'd have a hard time
getting past the taxonomy enforced by C++ and other OOLs.
I don't have that problem with Ada.

As Samuel Mize says, tagged types provided a mechanism
for type extension. Since OOP relies upon type extension,
tagged types are a natural match. Packages provide encapsulation
and naming scope. Packages group things together. A OO class
is a grouping of a data structure type and its defined
operations. So a class must be a package defining a tagged
type and including all the primative operations on that
type. Both are required to implement a class.

Singular inheritance is directly supported by the language
through tagged types. Multiple inheritance, in several forms,
is supported by combining tagged types with other language
constructions such as generics. I believe Ada 95 Rational
provides an in-depth discussion on kinds multiple inheritance,
why they are not directly supported, and how achieve the
desired result.

I just wish Ada didn't use the term class-wide type.
It is a term with too much overloaded meaning.

Since you are an Ada neophyte, I recommand you
visit www.adahome.com and browse around. You'll
want to consider downloading the GNAT compiler for your
personal use at home. You may also consider getting
the Walnut Creek Ada CDROM which contains tons of
code and supporting documents which are not just
limited to Ada, but also include good software
engineering as well.

-- 
Samuel T. Harris, Principal Engineer
Raytheon, Scientific and Technical Systems
"If you can make it, We can fake it!"




  reply	other threads:[~1999-02-24  0:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-05  0:00 How to write TYPECASE in Ada 95? Norman Ramsey
1999-02-05  0:00 ` Brian Rogoff
1999-02-05  0:00   ` David C. Hoos, Sr.
1999-02-05  0:00     ` Brian Rogoff
1999-02-06  0:00   ` Ed Falis
1999-02-06  0:00     ` Nick Roberts
1999-02-06  0:00       ` Nick Roberts
1999-02-17  0:00     ` Tom Moran
1999-02-18  0:00       ` Matthew Heaney
1999-02-18  0:00         ` Tom Moran
1999-02-18  0:00           ` Matthew Heaney
1999-02-18  0:00         ` Tom Moran
1999-02-18  0:00         ` robert_dewar
1999-02-19  0:00           ` Tom Moran
1999-02-19  0:00           ` Nick Roberts
1999-02-19  0:00     ` Tom Moran
1999-02-19  0:00       ` Tom Moran
1999-02-23  0:00       ` Samuel Mize
1999-02-23  0:00         ` Question (was Re: How to write TYPECASE in Ada 95?) Mike Silva
1999-02-24  0:00           ` Samuel T. Harris [this message]
1999-02-24  0:00             ` Matthew Heaney
1999-02-24  0:00               ` Tucker Taft
1999-02-24  0:00           ` (long) programming by extension (was: " Samuel Mize
1999-02-24  0:00             ` (long) programming by extension Samuel Mize
1999-02-25  0:00               ` (shorter and new) " Samuel Mize
1999-02-25  0:00                 ` Mike Silva
1999-02-26  0:00                   ` Samuel Mize
1999-02-24  0:00           ` Question (was Re: How to write TYPECASE in Ada 95?) Nick Roberts
1999-02-06  0:00 ` How to write TYPECASE in Ada 95? Matthew Heaney
1999-02-06  0:00 ` David C. Hoos, Sr.
1999-02-06  0:00   ` Matthew Heaney
1999-02-06  0:00     ` Matthew Heaney
1999-02-06  0:00     ` Matthew Heaney
1999-02-09  0:00     ` David C. Hoos, Sr.
replies disabled

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