From ... From: Erik Naggum Subject: Re: Deep copy in lisp: how? Date: 2000/04/10 Message-ID: <3164355240918791@naggum.no>#1/1 X-Deja-AN: 609066345 References: <38F0B90A.8FC4B502@san.rr.com> <3164291289641126@naggum.no> <38F0D50B.8F4EE798@san.rr.com> <3164297272958870@naggum.no> <38F11CBD.CF70B8F8@san.rr.com> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 955367874 12488 195.0.192.66 (10 Apr 2000 11:57:54 GMT) Organization: Naggum Software; vox: +47 8800 8879; fax: +47 8800 8601; http://www.naggum.no User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.5 Mime-Version: 1.0 NNTP-Posting-Date: 10 Apr 2000 11:57:54 GMT Newsgroups: comp.lang.lisp * Courageous | Never had that happen is all of 3 years using the code generator that I | had, which would, in fact, copy wildly crazy and cyclic graphs of objects | perfectly correctly. that's a ridiculously bold statement. how do you _know_? would you even have _seen_ an error if it occurred? | Furthermore, if you look into the world of object oriented databases, | you'll find that various oodbs also do this perfectly well. they do it by restricting the domain to fit what they implement, but it fits the C++ mind-set to think this way and take it for granted that others will understand that "of _course_ we don't do the hard stuff". in this newsgroup and in Lisp, the trivial problems are uninspiring, and so we tend to think in broader terms. this means that arbitrary limits are regarded as cheating, unless yo present the limited domain up front as inherent engineering decisions. did you do that? no. foo on you for that. | Perhaps we're having a definition of terms problem? yes, you come from the C++ world. C++ people are extremely arrogant the way they think they invented object-orientedness. they didn't, OK? C++ doesn't even touch upon the really hard areas. you have to face this fact, or you'll make more ridiculously bold statements that reflect very badly on your ability to deal with complexity. | I can't write a specific graph copier, because I don't have a- priori | knowledge of the structure of the objects that I will be copying. at issue is knowing the _intent_ of the slots, not which they are. in Common Lisp we have the MOP to ask for the structure of the objects. piece of cake, really. just like databases can report on such things. it doesn't help one bit in deciding whether to make a shallow or deep copy, though. #:Erik