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,35b27ed90ca6e504 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-29 00:30:36 PST Path: sparky!uunet!usc!rpi!batcomputer!ghost.dsi.unimi.it!univ-lyon1.fr!scsing.switch.ch!sicsun!disuns2.epfl.ch!lglsun!magnus From: magnus@lglsun.epfl.ch (Magnus Kempe) Newsgroups: comp.lang.ada Subject: Re: Ada 9X _has_ "class" Message-ID: <1993Mar29.085902@lglsun.epfl.ch> Date: 29 Mar 93 07:11:58 GMT References: <1993Mar19.213439.2342@evb.com> <1993Mar24.164424@lglsun.epfl.ch> <1993Mar25.102730.10202@cenatls.cena.dgac.fr> Organization: Ecole Polytechnique Federale de Lausanne NNTP-Posting-Host: lglsun4.epfl.ch Date: 1993-03-29T07:11:58+00:00 List-Id: In article <1993Mar25.102730.10202@cenatls.cena.dgac.fr>, bruniau@cenatls.cena.dgac.fr (Christophe Bruniau) writes: : : What does an instance of a class look like ? Given a tagged type T and two derived types T1 and T2, you get the following: T1'class and T2'class are subclasses of T'class. Any object belonging to the specific type T1 is thus an instance of T1'class and of T'class. Same for T2, mutatis mutandis. Any object belonging to the specific type T is an instance of T'class (but not of T1'class, of course). Thus: X : T; -- instance of T'class Y : T1; -- instance of T1'class and T'class Z : T2; -- instance of T2'class and T'class In Ada 9X, to "be an instance of class such-and-such" is a property of all objects belonging to the types in that class. Most of the time you want to program with specific types, and sometimes you want to use class- wide programming techniques. Ada 9x gives you both, with strong typing. -- Magnus Kempe "No nation was ever drunk when wine was cheap." magnus@lglsun.epfl.ch -- Thomas Jefferson