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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ce0900b60ca3f616 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-13 14:53:17 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newspeer.radix.net!uunet!ash.uu.net!xyzzy!nntp From: Jeffrey Carter Subject: Re: List container strawman X-Nntp-Posting-Host: e246420.msc.az.boeing.com Content-Type: text/plain; charset=us-ascii Message-ID: <3BF1A21C.E7F03FD4@boeing.com> Sender: nntp@news.boeing.com (Boeing NNTP News Access) Content-Transfer-Encoding: 7bit Organization: The Boeing Company X-Accept-Language: en References: <3BE29AF4.80804@telepath.com> Mime-Version: 1.0 Date: Tue, 13 Nov 2001 22:43:40 GMT X-Mailer: Mozilla 4.73 [en]C-CCK-MCD Boeing Kit (WinNT; U) Xref: archiver1.google.com comp.lang.ada:16473 Date: 2001-11-13T22:43:40+00:00 List-Id: Stephen Leake wrote: > > Good example. But there are many other examples where copying a list > does _not_ make sense. For example, if I have a list of controls in a > GUI dialog box, and I pop up another dialog box, I want a list of > _new_ controls, not the same ones. Since an unbounded list creates values of the Element type, assigns to them, and deallocates them, we must rely on the client to provide an actual type that handles this properly. If an Element contains a pointer and the client wants a deep copy, assignment must perform a deep copy. If the client wants multiple pointers to the same object, assignment need only copy the pointer. This is not a concern of the list. -- Jeffrey Carter