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,5997b4b7b514f689 X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Reading a line of arbitrary length Date: 1997/02/16 Message-ID: #1/1 X-Deja-AN: 219258396 References: <5ds40o$rpo@fg70.rz.uni-karlsruhe.de> Content-Type: text/plain; charset=ISO-8859-1 Organization: Estormza Software Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1997-02-16T00:00:00+00:00 List-Id: In article , dewar@merv.cs.nyu.edu (Robert Dewar) wrote: ><allocation nor GNAT-specific extensions to the language.>> > >I don't know why one should worry about explicit heap allocation as opposed >to implicit heap allocation being done behind the scenes in >Ada.Strings.Unbounded (almost certainly Append is likely to do some >heap allocation ...) Yes, it's true the heap is being implicitly allocated behind the scenes, and that is exactly where I prefer to keep it. In general, messing with heap is dangerous business. If it's a toss-up between a solution that requires explicit heap allocation and a solution that hides that allocation, then the latter solution wins. Also, I'm assuming that implementations of Unbounded_String are going to make heap-space allocation optimizations that won't necessarily apply to using the new operator directly. -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271