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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d1df6bc3799debed X-Google-Attributes: gid103376,public From: blaak@mda.ca (Ray Blaak) Subject: Re: Syntax for tagged record types (was Re: Not intended for use in medical,) Date: 1997/05/27 Message-ID: <5mesm7$j1c@freud.mda.ca>#1/1 X-Deja-AN: 244256621 References: <3.0.32.19970423164855.00746db8@mail.4dcomm.com> <33828299.2A3@world.std.com> <33850721.49BF@sprintmail.com> Organization: Macdonald Dettwiler & Associates Newsgroups: comp.lang.ada Date: 1997-05-27T00:00:00+00:00 List-Id: mheaney@ni.net (Matthew Heaney) writes: >But I'm trying to avoid using any heap. If I have to allocate an object, >I'd rather it go on the stack. Limitedness forces me to put the object on >the heap. Why? It's just a syntactic quirk of the language (the confusion >of assignment and initialization) that prevents me from initializing a >limited object during its elaboration. If we could eliminate those times >when a limited object must be put on the heap, then there would be less >motivation for a garbage collector. This might be tedious, but you can get limited types on the stack via function parameters: declare procedure Doit (To_Me : in out Some_Limited_Type) is begin blah blah end Doit; begin Doit(To_Me => My_Constructor ("foobar")); end; Cheers, Ray Blaak blaak@mda.ca