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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1888e8caa20a2f2d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Controlled types and exception safety References: <8sKdnXNeIZMxIg3eRVn-ig@comcast.com> <3trncoj4t0va.19bs46zhm4xbe.dlg@40tude.net> <2Rklf.171$n1.114@newsread2.news.pas.earthlink.net> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <6z9mf.1704$Tg2.1265@newsread1.news.pas.earthlink.net> Date: Fri, 09 Dec 2005 06:33:38 GMT NNTP-Posting-Host: 67.3.181.160 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1134110018 67.3.181.160 (Thu, 08 Dec 2005 22:33:38 PST) NNTP-Posting-Date: Thu, 08 Dec 2005 22:33:38 PST Xref: g2news1.google.com comp.lang.ada:6788 Date: 2005-12-09T06:33:38+00:00 List-Id: Randy Brukardt wrote: > > You're expecting a bitwise copy to work for that? That seems wrong; since > the advantage to your scheme is that you can do operations on the old > left-hand side before the assignment. But if that "old" object is a > temporary, you have no access to it, and you have degraded to the current > scheme. Except that it is worse, because you can't have position-dependent > items. I'm not being very clear or precise, am I? We're talking about default assignment for a type with a component with user-defined assignment, but the component doesn't exist in the LHS. If that's the only component with user-defined assignment, then you can't use the LHS during assignment anyway, so you can assign to an intermediate for the whole value without losing anything. If you have components with user-defined assignment in the LHS, and they continue to exist after the discriminants change, then you would use the components themselves. If you have a mix, then you can use intermediates only for the objects that don't already exist in the LHS. We've probably beaten this dead horse too much already. > That seems odd to me; what's the value of preventing aggregates of types > containing components of the limited type? (Preventing aggregates of limited > private types is a feature of private types, not limited types.) > > Not in Ada 95; you can't write a useful function without standing on your > head. Such a function can only return a global variable, which is ugly at > best and impossible for anything but literal constants. I think we're talking at cross purposes. I'm talking about changes that I thought Ada 83 needed. You're talking about how things work in Ada 95. In Ada 83, the only limited types were tasks and private types (and types with limited components), and for the most part I'm thinking of limited private types that are not limited in the full view. -- Jeff Carter "Why don't you bore a hole in yourself and let the sap run out?" Horse Feathers 49