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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,63a41ccea0fc803a X-Google-Attributes: gid103376,public From: John Volan Subject: Re: Naming of Tagged Types and Associated Packages Date: 1998/08/11 Message-ID: <35D0A547.35E684E4@ac3i.dseg.ti.com>#1/1 X-Deja-AN: 380165865 Content-Transfer-Encoding: 7bit References: <6qfp80$p0u$1@nnrp1.dejanews.com> <35CD0A8E.21D64380@sprintmail.com> <35CEBAAF.B9B82820@sprintmail.com> Content-Type: text/plain; charset=us-ascii Organization: Raytheon Systems Company, Advanced C3I Systems Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-08-11T00:00:00+00:00 List-Id: John G. Volan wrote: > > In fact, what if we even wanted to _preclude_ any > inheritance? (In Ada terms, the Car type would be non-tagged... On second thought, making a type non-tagged doesn't actually preclude _inheritance_ as such. In Ada, one may derive a new type from any type, even from a scalar type such as Integer; the new type technically inherits all the properties of the parent type, including all its primitive operations (those declared in the same package spec with the parent type). In this sense, even Ada83 supported inheritance. What a non-tagged type does preclude is type extension, polymorphic class-wide programming, and dynamic dispatching. But to my knowledge, there is no mechanism in Ada to selectively prevent type _derivation_. -- Signature volanSignature = new Signature ( /*name: */ "John G. Volan", /*employer: */ "Raytheon Advanced C3I Systems, San Jose", /*workEmail: */ "johnv@ac3i.dseg.ti.com", /*homeEmail: */ "johnvolan@sprintmail.com", /*selfPlug: */ "Sun Certified Java Programmer", /*twoCents: */ "Java would be even cooler with Ada95's " + "generics, enumerated types, function types, " + "named parameter passing, etc...", /*disclaimer:*/ "These views not packaged in COM.ti.dseg.ac3i, " + "so loading them throws DontQuoteMeError. :-)" );