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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5d4ade2fd8fd67c6 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.78.MISMATCH!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Legit Warnings or not Date: Sat, 23 Jul 2011 11:03:34 +0200 Organization: cbb software GmbH Message-ID: References: <531193e0-3305-4292-9ed8-0176226c1d00@x12g2000yql.googlegroups.com> <1rx6dwrxmc81p.eazb4fjqztox$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: ILHyZQcch+AFigDCJ5I8TA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:20315 Date: 2011-07-23T11:03:34+02:00 List-Id: On Fri, 22 Jul 2011 19:36:26 -0500, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:1rx6dwrxmc81p.eazb4fjqztox$.dlg@40tude.net... > ... >> I think that Ada should not try to support this stuff. > > Ada *does* support this stuff. As Adam noted, there are rules preventing the > creation of accesses/renames of/into components that might change size. But it should not. Programmers expect types constructed by the compiler be contiguous in their private view. > There also are rules supporting allocation/deallocation of objects that have > multiple parts. So far as I know, those are the only rules needed to do so. Meaningful X'Size? Expectations in an implementation of Ada.Finalization.Adjust? > There also are rules supporting allocation/deallocation of objects that have > multiple parts. So far as I know, those are the only rules needed to do so. E.g. in a user-defined specific pool? > And, as noted, Janus/Ada always has worked this way. I originally thought > Ada compilers were expected to work this way, because there is no good > reason not to support this as the default (as noted, some target > environments might not want such objects, and pragma Restrictions can surely > be used to prevent them from being generated). But apparently, implementers > are lazy enough to avoid it, and customers have never pushed hard enough to > get it added as an option. As a customer I see that the language separates definite and indefinite types. If this distinction is necessary, then the same logic applies to the implementation. I prefer transparent and simple implementations in order to know what to expect. In cases where I need referential semantics I prefer to implement it by myself, rather than to rely on the compiler. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de