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,7251fa99aab97e06 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-20 19:25:27 PST Path: sparky!uunet!dtix.dt.navy.mil!mimsy!alex From: alex@cs.umd.edu (Alex Blakemore) Newsgroups: comp.lang.ada Subject: Re: In favor of tagged types (was Classes versus tagged types was Ichibah flames, and flames out over, Ada 9X) Message-ID: <65257@mimsy.umd.edu> Date: 21 Mar 93 03:20:30 GMT References: <1993Mar19.222836.2540@evb.com> Sender: news@mimsy.umd.edu Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Date: 1993-03-21T03:20:30+00:00 List-Id: 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