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: f4fd2,23202754c9ce78dd X-Google-Attributes: gidf4fd2,public X-Google-Thread: 114809,15edb893ef79e231 X-Google-Attributes: gid114809,public X-Google-Thread: 103376,15edb893ef79e231 X-Google-Attributes: gid103376,public X-Google-Thread: fac41,15edb893ef79e231 X-Google-Attributes: gidfac41,public X-Google-ArrivalTime: 2002-01-25 16:39:57 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!enews.sgi.com!news.xtra.co.nz!not-for-mail From: "AG" Newsgroups: comp.lang.lisp,comp.lang.ada,comp.lang.eiffel,comp.lang.smalltalk 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> <3C4DE336.3080102@worldnet.att.net> Subject: Re: True faiths ( was Re: The true faith ) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Sat, 26 Jan 2002 13:40:00 +1300 NNTP-Posting-Host: 210.86.45.158 X-Complaints-To: newsadmin@xtra.co.nz X-Trace: news.xtra.co.nz 1012005561 210.86.45.158 (Sat, 26 Jan 2002 13:39:21 NZDT) NNTP-Posting-Date: Sat, 26 Jan 2002 13:39:21 NZDT Organization: Xtra Xref: archiver1.google.com comp.lang.lisp:25282 comp.lang.ada:19315 comp.lang.eiffel:5521 comp.lang.smalltalk:18659 Date: 2002-01-26T13:40:00+13:00 List-Id: > Bruce Hoult wrote: > > > Garbage collection has a *lot* to do with this problem! > > > > A large proportion of assignments in languages such as C++ are done > > merely in order to resolve the question of who owns an object and who is > > responsible for eventually deleting it. > > > > With GC available, objects are seldom copied with pointers to them being > > passed around instead. You don't care who "owns" the object, because it > > just magically goes away when all the pointers to it get forgotten. This doesn't seem to be a question of something "going away", it's a question of how the object(s) behave while they are still in use. For example: Suppose you have a process A which has something (an object or whatever) called X it wants to pass to a process B. The process B must be free to do whatever it wants to/with that X thing. However, the process A also wants to keep going with the X after the B is done with whatever it was doing (and I won't even mention the case where it wants to do it *while* the B is at it). This sort of thing can be very useful in a roll-back situations, or when some duplicates are in fact completely independent in their handling but just happen to come from the same source etc. Pointers/references are totally useless in such cases, you do need a separate copy and, if the language doesn't provide it, you are reduced to hand-coding it yourself. With all the pitfalls that it may entail. If my vague recollection of the vintage Pascal is correct, it did have a specific distinction between P^ := Q^; and P := Q; Which was, of course, the difference between the shallow and [one-level]deep copy. Now, just where does a GC come to play in this difference? Mind you, that vintage Pascal could have or not the GC implemented - the semantics would be exactly the same. The same applies to your argument above - it doesn't really matter what happens to the storage after it's out of use. The question is/was how do you implement the semantics while it's still around.