Re: copying arrays
- From: Richard M Kreuter <kreuter@xxxxxxxxx>
- Date: Sun, 29 Apr 2007 17:27:34 -0400
Kent M Pitman <pitman@xxxxxxxxxxx> writes:
... we teach people to be thoughtful about when a copy would help
and when not. Certainly we copy things. But we don't think to
copying as so important that it should be done by default all the
time; just the opposite, we think object identity is central and we
should think carefully about when to risk a separation of identity.
The OP seems to have expected (or at least wanted) SETF to make a copy
of the array. This might suggest a background in a language like Perl
or PHP, where the thing that looks like assignment actually does
something resembling a shallow copy (most of the time: sometimes it
does a CLRHASH or something like emptying a ring buffer). For a
variety of reasons, in these languages you often care only about how
things print, and so that kind of equivalence is usually more
important than object identity. Since EQUAL-but-not-EQ objects are
generally sufficient, and since these languages' libraries are mostly
full of destructive operations, it's idiomatic in these languages to
copy things literally all the time. That's not an argument for the
goodness of copying; it's just a comment about the expectations of
people with some sorts of background, and so about how Lisp would seem
strange to someone coming from those languages.
--
RmK
.
- References:
- copying arrays
- From: Q
- Re: copying arrays
- From: Alan Manuel K. Gloria
- Re: copying arrays
- From: Dan Bensen
- Re: copying arrays
- From: Kent M Pitman
- copying arrays
- Prev by Date: Re: CL Scaling for High Traffic Web Sites
- Next by Date: Re: programmatically determine if argument is list compatible to a given lambda list
- Previous by thread: Re: copying arrays
- Next by thread: Re: copying arrays
- Index(es):
Relevant Pages
|