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: fac41,15edb893ef79e231 X-Google-Attributes: gidfac41,public X-Google-Thread: f4fd2,23202754c9ce78dd X-Google-Attributes: gidf4fd2,public X-Google-Thread: 103376,15edb893ef79e231 X-Google-Attributes: gid103376,public X-Google-Thread: 114809,15edb893ef79e231 X-Google-Attributes: gid114809,public X-Google-ArrivalTime: 2002-01-23 14:25:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.co.uk!demon!lostwithiel.cley.com!lostwithiel!nobody From: Tim Bradshaw Newsgroups: comp.lang.lisp,comp.lang.ada,comp.lang.eiffel,comp.lang.smalltalk Subject: Re: True faiths ( was Re: The true faith ) Date: 23 Jan 2002 22:24:46 +0000 Organization: Cley Ltd Sender: tfb@lostwithiel Message-ID: References: <%njZ7.279$iR.150960@news3.calgary.shaw.ca> <3c36fbc5_10@news.newsgroups.com> <4idg3u40ermnp682n6igc5gudp7hajkea9@4ax.com> <76be8851.0201101909.9db0718@posting.google.com> <9jtu3u8cq92b05j47uat3412tok6hqu1ki@4ax.com> <3C3F8689.377A9F0F@brising.com> <3219936759616091@naggum.net> <3C483CE7.D61D1BF@removeme.gst.com> <7302e4fa4a.simonwillcocks@RiscPC.enterprise.net> <3C4D9B03.60803@mail.com> <3C4DE2F3.9020904@mail.com> <3C4DF550.24D3333A@nyc.rr.com> <3C4F272B.6020209@mail.com> NNTP-Posting-Host: lostwithiel.cley.com X-NNTP-Posting-Host: lostwithiel.cley.com:212.240.242.98 X-Trace: news.demon.co.uk 1011824649 nnrp-02:769 NO-IDENT lostwithiel.cley.com:212.240.242.98 X-Complaints-To: abuse@demon.net User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Xref: archiver1.google.com comp.lang.lisp:25109 comp.lang.ada:19261 comp.lang.eiffel:5514 comp.lang.smalltalk:18554 Date: 2002-01-23T22:24:46+00:00 List-Id: * Hyman Rosen wrote: > It does no such thing. The original problem specified an object with > two subobjects which were owned by the parent and with a non-empty > base object. You must write assignment for this type so that the > destination acquires its own private copies of the subobjects of the > source, and such that if copying any subcomponent fails (with an > exception) you leave the destination object undamaged. Well, one thing here is a terminological issue - in many GCd languages assignment would not make a copy, so assignment and copying are conceptually different operations. But what GC does solve is not the copying problem - which, in Lisp at least (together with the related equality problem), is regarded as an issue which does not have a general solution nor any hope of one: Lisp people at least do not regard copying as trivial - but the problem of needing to copy to resolve low-level ownership issues. If you have to manually manage memory then it's crucial that only one person frees the memory associated with some object, and one (bad) way of resolving this is, if you need two handles on something, to actually make a copy, so each copy can then be independently freed. In a GCd language this is a non-problem since the reuse of memory is dealt with by the GC, so you can happily pass around a reference to the thing instead. --tim