Re: Arrays
From: David Sletten (david_at_slytobias.com)
Date: 11/28/04
- Next message: David Sletten: "Re: othello(reversi) game problem!"
- Previous message: Carl Shapiro: "Re: How to comment (and uncomment) blocks in SLIME"
- In reply to: Steven M. Haflich: "Re: Arrays"
- Next in thread: John Thingstad: "Re: Arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 28 Nov 2004 22:36:26 GMT
Steven M. Haflich wrote:
> Not at all, but there was also a newbie motivation for my post.
>
> Arrays are very rich objects in CL. When a question is posed about
> copying some sort of object, or testing one for equality, there are
> unstated assumptions about the putpose of the copyu or the purpose
> of the test. The important thing for a newbie to learn is to make
> those assumptions explicit -- not only to c.l.l, but also to himself
> -- so the appropriate solution can be found.
>
> The copy-array solution in your link is sophisticated and elegant,
> but _not_ general. No single solution sould be general, at least,
> not without a zillion keyword arguments.
>
> There are lots of circumstances in which one might want to copy an
> array in CL, but one of the most common occurs when an adjustable
> fill-pointer vector (often a string) is used to collect an
> undetermined number of elements, and then when an entire entity has
> been collected, a copy is made into a fixed-length, simple vector.
> The Lisp reader does a lot of this when reading strings and symbols.
>
> Now, the cited copy-array wouldn't be the appropriate kind of copy
> for this application. When one selects machinery to copy comething,
> one needs to make explicit these sorts of possibilities in case they
> matter.
Fair enough. I see your point now. You're helping the newbie (and me)
understand there are questions he maybe didn't even realize needed to be
asked.
Thanks,
David Sletten
- Next message: David Sletten: "Re: othello(reversi) game problem!"
- Previous message: Carl Shapiro: "Re: How to comment (and uncomment) blocks in SLIME"
- In reply to: Steven M. Haflich: "Re: Arrays"
- Next in thread: John Thingstad: "Re: Arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|