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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada Successor Language Date: Tue, 26 Jun 2018 19:25:24 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <5e86db65-84b9-4b5b-9aea-427a658b5ae7@googlegroups.com> <776f3645-ed0c-4118-9b4d-21660e3bba4b@googlegroups.com> <87602fbu2g.fsf@nightsong.com> <87po0mziqt.fsf@nightsong.com> <87fu1izfgs.fsf@nightsong.com> <878t75nwad.fsf@adaheads.home> <15b6f89f-997b-45ac-86b4-2e614bb624c2@googlegroups.com> <28a46046-e7eb-4306-bc39-72bc751831ae@googlegroups.com> NNTP-Posting-Host: 3CrKQyqWAJZHy6zYVP/kUg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.3 Xref: reader02.eternal-september.org comp.lang.ada:53336 Date: 2018-06-26T19:25:24+02:00 List-Id: On 2018-06-26 18:50, Dan'l Miller wrote: > On Tuesday, June 26, 2018 at 10:38:50 AM UTC-5, Simon Wright wrote: >> ric.wai88@gmail.com writes: >> >>> I hope I can opt to be out-side of this "Ada" community who seem bent >>> on wasting copious time determining overly contrived ways of >>> destroying Ada from the inside out.. Apparently because Ada's >>> carefully enforced discipline is too inconvenient, or something. >> >> I agree with you. It feels as though we have a few people around who >> enjoy wild flights of fancy. > > I agree. Ada does not need records with external-to-record tags. Ada already has them, since 1983. > (What the heck would we call these, btw? Untagged tagged records? Tagged untagged records?) There is no special name in RM 3.8, just "record". > In a more general case, what Ada needs slightly more that is vaguely on a similar topic is satisfying Steelman requirement 3-3F, one of the very few Steelman requirements that Ada83 didn't live up to: > https://www.dwheeler.com/steelman/steeltab.htm#3-3F > > Presumably the external-to-record tag could be such a constant field of the record, where that field does not occupy storage in the record, as 3-3F requires permitting. Surely type tag is a constraint and can be considered a discriminant. Note that array type constraints (bounds) are in the object only if the array object is indefinite. Compare this with the type tag. > (But Steelman 3-3F does nothing to rectify my fear that the compiler would choose the wrong strong type and thus choose the wrong external-to-record tag in certain situations, importing C++ slicing into Ada.) You have a mental lock on how type-specific objects and class-wide objects must be represented. Embedded type tag is an artifact of tagged types design, mainly for the purpose of having view conversions between T<:T1<:T2 and T and T'Class. It does not mean that all objects must have such representation, by no means. Again, remember that Ada was designed with the idea of separation of interface and implementation. Many problems Ada has come from disregarding this principle. Embedded tag and by-reference parameter passing are just implementation details. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de