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!news.unit0.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Ada Successor Language Date: Mon, 25 Jun 2018 22:32:08 +0300 Organization: Tidorum Ltd Message-ID: References: <5e86db65-84b9-4b5b-9aea-427a658b5ae7@googlegroups.com> <878t7u1cfm.fsf@nightsong.com> <776f3645-ed0c-4118-9b4d-21660e3bba4b@googlegroups.com> <87602fbu2g.fsf@nightsong.com> <87po0mziqt.fsf@nightsong.com> <87fu1izfgs.fsf@nightsong.com> <878t75nwad.fsf@adaheads.home> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net m7uKDNlXVI9cwDOgmi9MdQJoY9duVsHx1mBzE5izA+wK9O8Bir Cancel-Lock: sha1:NeoTXa5rBXtox+S1Sq512DITH28= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: reader02.eternal-september.org comp.lang.ada:53311 Date: 2018-06-25T22:32:08+03:00 List-Id: On 18-06-25 17:44 , J-P. Rosen wrote: > Le 25/06/2018 à 16:21, Dmitry A. Kazakov a écrit : >> Ada could allow T'Class for untagged T. T'Class would be an indefinite >> type with values consisting of the actual type's tag and its value. When >> T is by-value type, you pass T'Class to a subprogram as tag + value. >> When T is by-reference type, you pass tag + reference. >> >> Upon dispatch, you strip the tag from the value or reference before >> passing value/reference down. > > It was a requirement of Ada95 that OOP be strictly contained, and that > the same typing system as Ada83 be kept for those who don't want OOP. Neither Dmitry's suggestion for untagged class-wide programming nor my suggestion for untagged record extension conflicts with or replaces the Ada83 typing system. Rather, these suggestions would interpolate new typing features intermediate between the Ada83 typing system and Ada95 tagged types. If these features had been suggested for and included in Ada95, they might have helped some Ada83 designs evolve incrementally towards OOP, without leaping all the way to tagged types. Whether the impact on Ada95 compiler complexity would have been too large to be worth it, is another question. Both suggestions seem to require new kinds of code generation for some calls, not needed for Ada83 (where there are no tags) nor for tagged types (where tags are embedded in objects). -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .