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,b1a1671673a84c5e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.68.MISMATCH!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Allocators for anonymous access return types Date: Sun, 31 Oct 2010 15:10:15 +0100 Organization: Adalog Message-ID: References: <87ocaa1rph.fsf@mid.deneb.enyo.de> <87d3qq1ont.fsf@mid.deneb.enyo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 31 Oct 2010 14:10:23 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="O1RkH+WVNUV47UyqsXe2BA"; logging-data="1868"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18PnT1gkDFD3t77PNIojqxO" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 In-Reply-To: <87d3qq1ont.fsf@mid.deneb.enyo.de> Cancel-Lock: sha1:yhbF6wftbKqsTXA87OXjNX7IEgs= Xref: g2news1.google.com comp.lang.ada:15043 Date: 2010-10-31T15:10:15+01:00 List-Id: Le 31/10/2010 14:23, Florian Weimer a �crit : >> Conclusion: don't use them, especially with allocators. Use named >> types as much as possible. > > I'm trying to write type-safe variadic function which does not heavily > use the free store. > > With anonymous access types, it could look like this: > > package Variadic is > > type Variadic is tagged limited private; My first reaction would be to define here: type Variadic access is access Variadic; But you mention: > (My other example avoids copying, and seems to be safe according to > the ARM rules, as long as you don't declare something involving the > Unchecked_* types. A solution based on anonymous access types might > make this violation impossible, hence my interest in them.) I don't know what you mean by Unchecked_* types. I guess you mean no use of Unchecked_Conversion? Better use a restriction then. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Adalog a d�m�nag� / Adalog has moved: 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00