|
| |||
|
opening it up with Common Lisp |
|||
|
Favorite weblogs Lisp Related Politics Other home Recent Readings
Book review: Darwinia
Summer reading: Spin
Runner
the Omnivoire's Delimma
the Golem's Eye |
|
I can adjust Zach Beane helped to clarify my surprises with delete a bit via e-mail (thanks). One issue was my fuzzy recollection of the differences and connections between simple array, fill pointers and adjustability. Another is the issue of expressly adjustable versus actual adjustability. The hyperspec says that simple-array is:
When you delete from a vector, the array you get back may not be expressly adjustable anymore -- you can still call adjust-array on it but this may cause a copy to occur in order to do the adjustment. (Which, in my opinion, is sort of like claiming that everyone can fly as long as you don't care how hard they hit the ground when they land...). My issue was (and is) that I was using delete multiple times and didn't expect it to alter the actual adjustability of my vectors. This seems like a rough edge in the standard that should be improved in the Common Lisp 2007 standard. (In case anyone is wondering why this just cropped for me it's because I'm a long time Macintosh Common Lisp user and all of MCL's arrays are adjustable. SBCL has non-expressly adjustable arrays but the vector returned when you delete from an expressly adjustable array remains adjustable. So it wasn't until I started running code in Allegro that I ran into this corner. Live and learn (and complain [smile]). | |
|
|
Home | About | Quotes | Recent | Archives Copyright -- Gary Warren King, 2004 - 2006 |