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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.213.4 with SMTP id no4mr47151544obc.21.1435078663202; Tue, 23 Jun 2015 09:57:43 -0700 (PDT) X-Received: by 10.140.88.80 with SMTP id s74mr530867qgd.16.1435078663099; Tue, 23 Jun 2015 09:57:43 -0700 (PDT) Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!j8no517519igd.0!news-out.google.com!4ni2552qgh.1!nntp.google.com!q107no2891298qgd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 23 Jun 2015 09:57:43 -0700 (PDT) In-Reply-To: <1f6dpcxmxly1a$.zfhetu1wgtix$.dlg@40tude.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=185.30.133.97; posting-account=hya6vwoAAADTA0O27Aq3u6Su3lQKpSMz NNTP-Posting-Host: 185.30.133.97 References: <4lrj5zz2u2z.u8x9cf7xzic6.dlg@40tude.net> <58f64fa9-7d0b-44dd-870c-77d9afcb82c4@googlegroups.com> <1f6dpcxmxly1a$.zfhetu1wgtix$.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <667dce55-6a08-430b-bbe2-367e26a41e4e@googlegroups.com> Subject: Re: Ada design bug or GNAT bug? From: Vincent Injection-Date: Tue, 23 Jun 2015 16:57:43 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.giganews.com comp.lang.ada:193741 Date: 2015-06-23T09:57:43-07:00 List-Id: Le mardi 23 juin 2015 16:38:43 UTC+2, Dmitry A. Kazakov a =E9crit=A0: > > For the OOP concept is based on an interface that is the same and > > instances that are different realizations of the same concept. >=20 > This is an inconsistent concept if taken literally. OOP never talk about > types being same. It does about same *behavior*. This is miles over miles > different. T and T'Class behave as if they were same in some contexts, bu= t > they are not same from any point of view. Remember that class is a set of > types. A set is never equal to its instances. T'Class is a closure of > class. Closure of a set is not equal to an element of the set. A would rather call a set of types a category [of types], like Integers or dicrete types. A class type is an accessor to a category consisting of a gi= ven type and all types derived from it. =20 > > One may think that the distinction between class type and tagged type i= s > > subtle, but the implications of it are huge : without class object one > > needs as replacement access to a class wide type. >=20 > Why? >=20 Because one need a concrete object ! With generics you can have a formal ty= pe because it will be instantiated during the early phase of compilation, b= ut with OOP the code is generated before one knows the type of the object t= hat will be called at runtime. Strictly speaking this is not possible. The = only possible solution is to use a unique object as an accessor for all pos= sible objects. The simplest way was to use an access to a class wide type. = But Ada 83 limited the use of access types to pool specific types... Regards, Vincent