comp.lang.ada
 help / color / mirror / Atom feed
From: alex@cs.umd.edu (Alex Blakemore)
Subject: Re: In favor of tagged types (was Classes versus tagged types was Ichibah flames, and flames out over, Ada 9X)
Date: 21 Mar 93 03:20:30 GMT
Date: 1993-03-21T03:20:30+00:00	[thread overview]
Message-ID: <65257@mimsy.umd.edu> (raw)
In-Reply-To: 1993Mar19.222836.2540@evb.com

I just know I am going to regret joining in this thread :-;)

barbey@lglsun.epfl.ch (Stephane Barbey) writes:
>  In both Ada 83 and Ada 9X, a class is a set of types with similar
>values and operations. There are language-defined classes, for example
>the class of integer types, and user-defined classes. 

jgg@evb.com (John Goodsen) writes:
> You're making up terminology here.  These are considered "types" in Ada XX.

Actually Stephane is correct here. There is a precise definition of
a class in Ada - it is a SET of types (that is closed over derivation).
He is not making up terminology. It is a useful concept, corresponding in 
other languages to the idea "a class and all its subclasses".

In NeXT's Objective-C, there are methods isMemberOf: and isKindOf: that
query whether an object is a member of class A or a member of A or one
if its subclasses.  This shows that some OO users find it useful
to make the distinction between what in Ada9X is called a specific type
and a class wide type.

I tend to trust the MRT on this syntax issue.  Once you understand what
class means in Ada9X, it would be misleading in a big way to replace
the keyword tagged with the keyword class.  Extensible would be nice, but
does not suggest the extra overhead that tagged implies.  I'ld rather have the
language syntax be very explicit about possible overhead.

Ada9X does have classes and it does use the word class prominently in
the syntax.  Its model is somewhat different than other OO languages, but
self consistent.  I think I understand the other OO languages better
now after seeing Ada9X - it is less easy to grasp Ada9X OO at a glance though.

Lets give the issue a rest please. We all understand how you feel John and
your points have justification.  But its not a fatal flaw.  There is enough
class in Ada9X to allow it to prosper, if it is presented well to people with
open minds.  If someone is so close minded that they refuse to try Ada9X,
based on this syntactical issue then it really doesnt matter.
Someone like that would find some other reason to avoid Ada anyway -
perhaps just the fact that the DoD sponsored it.

> As far as I know,
> >there are no C++ terms to designate an Ada 9X class (maybe "hierarchy
> >of classes rooted at type T", although it is not satisfying).

> Huh?  First you say they're Ada 9X doesn't have a class, and now
> you're calling them a class.

John, please read the mapping spec again. Ada9X does have classes and
in fact I think it is an advance in some way to explicitly name the concept
"hierachy of classes rooted at type T". 

-- 
---------------------------------------------------
Alex Blakemore alex@cs.umd.edu   NeXT mail accepted



  reply	other threads:[~1993-03-21  3:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-03-19 22:28 In favor of tagged types (was Classes versus tagged types was Ichibah flames, and flames out over, Ada 9X) John Goodsen
1993-03-21  3:20 ` Alex Blakemore [this message]
1993-03-25 19:07 ` Assignment Overload in Ada-9X Jack Beidler
1993-03-25 21:40   ` Mark A Biggar
1993-03-25 22:29   ` Robert I. Eachus
  -- strict thread matches above, loose matches on Subject: below --
1993-03-24 16:56 In favor of tagged types (was Classes versus tagged types was Ichibah flames, and flames out over, Ada 9X) John Goodsen
1993-03-10 22:41 Ichibah flames, and flames out over, Ada 9X David Emery
1993-03-12 16:01 ` Tom Pole
1993-03-12 22:59   ` Charles H. Sampson
1993-03-16 17:35     ` Classes versus tagged types was " Tom Pole
1993-03-18 16:28       ` In favor of tagged types (was Classes versus tagged types was Ichibah flames, and flames out over, Ada 9X) Stephane Barbey
1993-03-19 18:13         ` Larry M. Jordan
replies disabled

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