From ... From: Erik Naggum Subject: Re: Deep copy in lisp: how? Date: 2000/04/09 Message-ID: <3164297272958870@naggum.no>#1/1 X-Deja-AN: 608804658 References: <38F0B90A.8FC4B502@san.rr.com> <3164291289641126@naggum.no> <38F0D50B.8F4EE798@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 955308531 28672 195.0.192.66 (9 Apr 2000 19:28:51 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: 9 Apr 2000 19:28:51 GMT Newsgroups: comp.lang.lisp * Courageous | I know this is possible one way or the other, for I have seen automatic | deep copy implemented via code generation in C++. I'm sorry, but you have been tricked. just because it exists for C++ is not in any way, shape, or form an argument for the _correctness_ of the implementation or the algorithm or even the concept to begin with. | I'm pretty new at lisp; however, so I'm not sure what language-specific | pitfalls I will encounter yet. you encountered a language-specific pitfall and fell headlong into it when you believed that C++ had an automatic solution. you will get out of this sorry state of affairs when you realize that such automated tools are not able to do their job. the key to understand this is that even in a class for which "deep copy" makes non-zero sense, you don't _always_ want to deep copy _everything_, and if you fail to implement it right, you will in fact destroy valuable information in the copying process. #:Erik