Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!hookup!swrinde!pipex!uknet!festival!edcogsci!jeff
From: jeff@aiai.ed.ac.uk (Jeff Dalton)
Subject: Re: Copying CLOS instance?
Message-ID: <CzDnEv.4op@cogsci.ed.ac.uk>
Sender: usenet@cogsci.ed.ac.uk (C News Software)
Nntp-Posting-Host: cara.aiai.ed.ac.uk
Organization: AIAI, University of Edinburgh, Scotland
References: <3998p8$es5@Times.Stanford.EDU> <KANDERSO.94Nov3131224@wheaton.bbn.com> <LGM.94Nov9082012@polaris.ih.att.com>
Date: Wed, 16 Nov 1994 20:25:43 GMT
Lines: 24

In article <LGM.94Nov9082012@polaris.ih.att.com> lgm@polaris.ih.att.com (Lawrence G. Mayka) writes:
>
>   The reason for this is that the semantics of what you mean by copying is
>   application specific.  For example, do you want a deep or shallow copy of
>   each slot?
>
>I must say that I never bought this argument: "Because no single copy
>function will do everything that everyone in the world wants, we'll
>make it impossible for anyone to do the obvious simple thing (shallow
>copy, just like structures and sequences) in any reasonably efficient
>way."

Hear! hear!

But I'd be happy to write my own copy fn if I could just get at all
slots in a reasonable way.  I realize, of course, that people
sometimes argue that what's a slot is application-specific (maybe
some slots are stored off in hash tables someplace).  That kind
of reasoning has been used against a number of useful things.

Given that we have CLOS, it should be possible to provide some
reasonable default behavior plus a way to specialize it.

-- jd
