comp.lang.ada
 help / color / mirror / Atom feed
From: jgg@evb.com (John Goodsen)
Subject: Re: In favor of tagged types (was Classes versus tagged types was Ichibah flames, and flames out over, Ada 9X)
Date: Wed, 24 Mar 1993 16:56:55 GMT
Date: 1993-03-24T16:56:55+00:00	[thread overview]
Message-ID: <1993Mar24.165655.142@evb.com> (raw)

alex@cs.umd.edu (Alex Blakemore) writes:

>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".

I stand corrected, to a degree, that is...  After reading the LRM,
there is the terminology "class of types".  You might call these
classes, but really, they are "a class of types".  The subtle 
difference is important to comprehend, because it is being used
as the basis for a fallacious argument.


>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.
>

In fact, some excellent articles have been written which discuss the
need for both "TYPES" (including classes of types) and CLASSES within
a language.  See the Bertrand Myers slew of articles that get shipped
to you when you inquire on Eiffel, for an "instance" of these articles :-)

>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.  

Let's get back to the *real* terminology proposal, and not confuse it
with what I just read above...  current Ada terminology discusses 
"classes of types" not "classes". 

>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.   

It's pretty standard to assume that overhead is incurred in classes
and inheritance.  This is usually the first argument people use
against OO languages. (until they see that they will hand-code this
*overhead* if the language doesn't give it to them directly).
Therefore, using the terminology "class type T is..."  instead of
"Type T is tagged ..."  will still imply overhead.  Remember the big
point is to give (non-technical) people the "CLASS" terminology to use
in literature which will be written concerning Ada 9X.  "Tagged Type"
will cause more confused readers than 9X converts.  The point is, once
again, use terminology which the norm of the community will relate to,
namely the terminology of "CLASS" and *THEN* show how the Ada 9X CLASS
TYPES are *better* than classes in other languages.

>Ada9X does have classes and it does use the word class prominently in
>the syntax.  

Prominently (via the 'CLASS attribute) but not consistently.
It takes a mind shift (albeit small once your versed in the syntax)
to correlate "Type T is tagged ..." and the 'CLASS attribute.
It would be more consistent to correlate "Class Type T is ..." 
with the 'CLASS attribute.

>Its model is somewhat different than other OO languages, but
>self consistent.  

Not self-consistent in the syntax sense, see above...

>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.
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Thank you for making the point again.  Tagged type terminology DOES
make the OO features of 9X hard to grasp at first glance.  The point
is that we can make it simpler to grasp at a glance through the
consistent, meaningful, *common* terminology of "Class Types" instead
of "Tagged Types".

>
>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.  
>

Well, I'm keeping a tally on this thread, and right now, more people
have sided with the "class type" than "tagged type" syntax.  I've also
received a lot of private email from well-respected individuals in the
Ada community who side with the "class type" syntax, so it seems this
issue is more important not to brush aside so thoughtlessly.

If this news thread is making you think twice about accepting
consufing, non-standard terminology in an important area of the
language, then  Good! That is exactly what it is meant to do.  If it just
plain annoys you, then you might use a KILL file.  

>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.

It's not that they would be close minded.  It's that you've got to
make it dirt simple and obvious that Ada supports the notion of class
and inheritance.  "tagged types" syntax is not going to help one bit.

Once again:  (reuse at work?:-)

   "The issue is a marketing issue, not a technical issue."
   "Market expansion requires that we talk in a language that the rest
    of the community understands.  CLASS *is* this terminology.
    TAGGED TYPES are not."

These opinions are re-usable...

--
John Goodsen                EVB Software Engineering, Inc.
jgg@evb.com                    - Ada & Object Oriented Training/Products
(301) 695-6960                 - Ada GUI & Graphics Tools and Training
                               - Software Reuse, Process & Environments



             reply	other threads:[~1993-03-24 16:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-03-24 16:56 John Goodsen [this message]
  -- strict thread matches above, loose matches on Subject: below --
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
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