Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Deep copy in lisp: how?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tim Bradshaw  
View profile  
 More options Apr 11 2000, 3:00 am
Newsgroups: comp.lang.lisp
From: Tim Bradshaw <t...@cley.com>
Date: 2000/04/11
Subject: Re: Deep copy in lisp: how?

* Courageous  wrote:
> Oh. Okay. Well then, looking at the *very same message* that you
> quoted, but taking a slow gander at the part you deliberately
> cut out in order to score points, I see:

Believe me, I'm not trying to score points off you, or anyone.  I
should obviously have quoted the original article as the one that
caused people to assume you wanted a truly general copier, but I
didn't hit ^ enough times & just picked a bit that looked like it
meant the same thing, which was stupid I realise.  I won't quote the
original now as you'll probably think I'm trying to win some stupid
argument.

I'll repeat once more the things you need to write a copier (actually
I notice I forgot to give one of them):

        a notion of equality of objects

        a method of saying if you've seen an object equal in the above
        sense to the one you are looking at now

        a method of knowing which slots of an object you need to
        descend into to copy it.  This depends on the semantics of the
        slots as well as their content (this is the one I failed to
        mention).

If your notion of equality is EQL or something similar, then the first
two things are done very well by a hashtable, if it is more general
then you need to write some hashtable-type thing.

`Knowing which slots' is application-dependent, but you can do stuff
with the MOP to find them.  I'd tend to do it with something like a
map-interesting-slots generic function with progn method combination
which I'd use to define the new interesting slots when I defined a new
class.

--tim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.