comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: polymophism
Date: 1996/11/21
Date: 1996-11-21T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.96Nov21155518@spectre.mitre.org> (raw)
In-Reply-To: 56skhq$9cg@hacgate2.hac.com


In article <570f4b$rbu@queeg.apci.net> oconnor@apci.net (James O'Connor) writes:

  > I once posted here, a long time ago, that I don't think Ada95 was
  > an OO language.  I received polite and informed rebuttals.  I'll
  > say it again, for the same reasons, and expect the same response
  > so now hard feelings to anyone around...

   First? of probably many polite informed rebuttals. ;-)

  > The reason I object to Ada being called OO is that I don't think
  > Ada has an entity, thing, whatever that you can point to and say
  > "that's an object".  Before you get into whether Polymorphism or
  > Inheritance (single or multiple, implementation or interface), I
  > think your first question should be 'can I create an object?'.  To
  > me, at least, an Object must be able to have two things, state and
  > behavior (data and operations).

    If you want to define an OO-language as one which has stateful
objects, and associated operations on the object, you should have no
objection to Ada 83 and 95 as OO languages.  The problem you have is
one of seeing the forrest for the trees.  In Ada the fundamental
abstraction is named "type."  Every object has a type, but as you are
aware, there is no single set of operatations associated with a type.
But this is only because, operations are associated with the view of a
type, to allow things in Ada that are not allowed in many other OO
languages.

    But most of those differences come up extremely rarely.  The one
that does often show up is the two (main) different views of a private
type.  Most of the time the model that works extremely well in Ada is
that a type defines a set of objects, and a set of operations.  (A
class wide type contains all the objects in the hierarchy rooted at
the base type, and the operations of the base type.)  Even limited
private types have some associated operations defined at the point of
declaration, and derived types, which are common in OO programming
have lots of implicitly declared operations.

    Now it is true that in Ada it CAN be harder to determine the set
of predefined operations for a type in than in C++.  However, when
programs get large, it is much EASIER to determine the set of
predefined operations in Ada 95 than in C++.  (This occurs because Ada
class hierarchies are typically bushier than in other OO
languages--not as high/deep, but with more branches at each level.
Types that are easily defined as siblings in Ada are often defined as
parent and child in C++ or Smalltalk.)

--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




  parent reply	other threads:[~1996-11-21  0:00 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-18  0:00 polymophism AGBOH CHARLES
1996-11-19  0:00 ` polymophism Darren C Davenport
1996-11-21  0:00   ` polymophism James O'Connor
1996-11-21  0:00     ` polymophism Mike Stark
1996-11-22  0:00       ` polymophism Klaus Brouwer
1996-11-23  0:00         ` polymophism James O'Connor
1996-11-25  0:00         ` polymophism Richard Riehle
1996-11-22  0:00       ` polymophism Norman H. Cohen
1996-11-22  0:00     ` polymophism Norman H. Cohen
1996-11-23  0:00       ` polymophism James O'Connor
1996-11-22  0:00         ` polymophism Matthew Heaney
1996-11-25  0:00           ` polymophism Joachim Durchholz
1996-11-26  0:00             ` polymophism Don Harrison
1996-11-25  0:00           ` polymophism Don Harrison
1996-11-25  0:00       ` Is Ada an OO Language? (was => Re: polymophism) Richard Riehle
1996-11-25  0:00         ` James S. Rogers
1996-11-23  0:00     ` polymophism John Howard
1996-11-21  0:00   ` Robert I. Eachus [this message]
1996-11-22  0:00   ` polymophism Jon S Anthony
1996-11-22  0:00     ` polymophism Robert A Duff
1996-11-23  0:00   ` polymophism Jon S Anthony
1996-11-24  0:00   ` polymophism Robert B. Love 
1996-11-27  0:00   ` Is Ada an OO Language? (was => Re: polymophism) Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
1996-11-26  0:00 polymophism Peter Hermann
1996-11-26  0:00 ` polymophism Peter Hicks
1996-11-26  0:00   ` polymophism Peter Hermann
1996-11-26  0:00 ` polymophism John Howard
1996-11-29  0:00 ` polymophism Richard Riehle
replies disabled

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