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,5d4ade2fd8fd67c6 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!news.in2p3.fr!in2p3.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Legit Warnings or not Date: Fri, 22 Jul 2011 19:52:13 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <531193e0-3305-4292-9ed8-0176226c1d00@x12g2000yql.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1311382334 28151 69.95.181.76 (23 Jul 2011 00:52:14 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 23 Jul 2011 00:52:14 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Xref: g2news2.google.com comp.lang.ada:21282 Date: 2011-07-22T19:52:13-05:00 List-Id: "Robert A Duff" wrote in message news:wcc8vrrbrb6.fsf@shell01.TheWorld.com... ... > Implicit heap allocation could be a good feature in a different > language, but then I'd want that language to allow: > > type Tree is tagged > record > Left, Right : Tree'Class; -- doubly illegal! > end record; Yes, of course Ada should support this, too. ;-) As noted, it's not particularly hard. Note that these sorts of allocations aren't really the same as heap allocations -- their lifetime is similar to that of the secondary stack. Janus/Ada does allocate them on the heap (with them being deallocated when scope goes away), but I've been thinking about ways to reduce/eliminate that. One obvious idea is to allocate the initial sizes off of the secondary stack, and only allocate from the heap if they get bigger via assignment in a different master (which is fairly rare). Not sure if that would save enough to be worth the extra complication. Randy.