TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Proportional Font
Show HTML Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Nasser Abbasi <[log in to unmask]>
Wed, 11 Nov 1998 09:35:04 -0800
Mark Lundquist <[log in to unmask]>
Mark Lundquist <[log in to unmask]>
Message from Nasser Abbasi <[log in to unmask]> of "Tue, 10 Nov 1998 09:31:51 PST." <[log in to unmask]>
text/plain; charset=us-ascii
text/plain (69 lines)
From:  Nasser Abbasi <[log in to unmask]>

> I think a language that does not have a class construct in it, will
> be very hard to use to do OO stuff in it.

Ada supports the abstraction of "class" quite readily, even though it
doesn't have a specialized "class" construct.  I think it's the
abstraction that is important, not the syntax.  So I have to disagree;
the lack of a special "class" construct in Ada does *not* make it very
hard to do OO in Ada!

> a class is the
> fundamental building block for OO systems. Even Ada95 does not
> have a 'class' construct, and that is what hurt it.

Politcally or "socioeconomically", perhaps... but I don't believe it
hurts Ada technologically.  I think the way OO is implemented in Ada95
kept the language cleaner.

The key concepts of OO are ("all together now..." :-) encapsulation,
inheritance, and polymorphism, right?  Having "class" as a keyword, a
syntax that encloses the declarations of operations within the
declaration of a data type, and/or prefix notation for invoking
primitive operations (whatever they may be called -- methods,
member functions, etc.) are not the key concepts -- just incidental
implementation details.

> even though
> you can do OO in Ada95,

...quite easily...

> it is quit different in appearance from
> what became the norm.


> look at all the OO languages out there and
> you'll see that they all have a 'class' in them, except Ada.

Yes, but so what? :-)

> but for almost anything else, I think OO thinking is better, and
> for Ada, I dont feel it has the right construct for that kind
> of methodology, too bad, since the language fundamentals are
> great, they just got the OO stuff in Ada added to it in the
> wrong way.
> my 2 cents.

My $0.02 is that in fact they did do the right thing w/ OO support in
Ada.  Not only was it the most consistent with the "language
fundamentals" that were already in place (in particular -- the "package"
construct as the unit of modularity/encapsulation, and the rules for
primitive operations), but having done it both ways, I like Ada's way
better than the the "class" way *anyway*.  (I learned OOP "before it was
cool", with Smalltalk -- a "pure" OOL).  I like it that encapsulation
is "orthogonal" to inheritance and polymorphism, instead of being
conflated into a single construct that tries to be everything.

Mark Lundquist
Senior Software Engineer
Rational Software Corporation

DISCLAIMER: I'm speaking as an Ada advocate, not as a representative of
Rational or as any kind of Ada "guru".