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.67.23.138 with SMTP id ia10mr63675750pad.18.1436186252979; Mon, 06 Jul 2015 05:37:32 -0700 (PDT) X-Received: by 10.140.106.247 with SMTP id e110mr438146qgf.7.1436186252934; Mon, 06 Jul 2015 05:37:32 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!qs7no835131igc.0!news-out.google.com!4ni66025qgh.1!nntp.google.com!m107no600065qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 6 Jul 2015 05:37:32 -0700 (PDT) In-Reply-To: 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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <701370ff-559b-458f-a107-793095a15749@googlegroups.com> Subject: Re: Ada design bug or GNAT bug? From: Vincent Injection-Date: Mon, 06 Jul 2015 12:37:32 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:26633 Date: 2015-07-06T05:37:32-07:00 List-Id: Le vendredi 3 juillet 2015 02:04:50 UTC+2, Randy Brukardt a =E9crit=A0: > The type Ichbiah wanted was syntactic sugar only. The semantics would hav= e=20 > been very similar to that of tagged types. The primary difference would h= ave=20 > been that we wouldn't have had to wait for Ada 2005 to get prefix calls. >=20 > [...] > >One may think that the distinction between class type and tagged type is= =20 > >subtle, but the implications of it are huge : without class object one= =20 > >needs as replacement access to a class wide type. This has led to the us= e > >of access values everywhere when doing OOP. > >To ease the pain access parameters and anonymous access types were=20 > >introduced... >=20 > This seems to me to be nonsense. There's no need to use access types in A= da=20 > OOP interfaces; "in out T" and "access T" have virtually the same semanti= cs=20 > when T is a tagged type. (Claw only has one access type in its entire=20 > interface, used for a return type that ought to be by reference. Everythi= ng=20 > else does not use visible access types.) It's more work this way, but it'= s=20 > definitely possible. Yes it is possible, but it is more work, since one has to encapsulate the a= ccess type into a "handle object". The pity is that this work is not done by the = compiler, through a proper language defined mecanism. (This is what I think= of when I speak of a "class type"). And even if you and I call it nonsense to use access types everywhere in ca= se of polymorphism, many textbooks present it as the normal Ada way of Advanced O= OP. Therefore I maintain that the "tagged type" concept of Ada 95 was, at least= , incomplete, not to say awkward. Regards, Vincent