From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3810e430f033eefa,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-24 13:04:55 PST Newsgroups: comp.lang.ada Path: sparky!uunet!widget!jgg 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) Message-ID: <1993Mar24.165655.142@evb.com> Organization: EVB Software Engineering, Inc. Date: Wed, 24 Mar 1993 16:56:55 GMT Date: 1993-03-24T16:56:55+00:00 List-Id: 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