Subject: Re: Deep copy in lisp: how?
From: Erik Naggum <>
Date: 2000/04/09
Newsgroups: comp.lang.lisp
Message-ID: <>

* 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.