On Tue, 27 Apr 2010, Nathan Froyd wrote:
> On Tue, Apr 27, 2010 at 10:33 PM, Daniel Herring <dherring@...> wrote:
>> P.S. Feel free to point out why this is a bad idea; but I couldn't find
>> anything in clhs which required simple-array. The code hasn't been touched
>> since it was imported to sbcl.
> I think the idea is neat. I will note that Ironclad assumes/depends
> (heavily!) on :TYPE VECTOR structures being simple arrays. If this
> patch goes in, that can of course be worked around. However, the
> (unwarranted?) assumption that Ironclad makes seems to be widely held
> across Lisp implementations. Maybe there's some obscure bit of
> history here...
Note: Even with this patch, SBCL says
* (defstruct (defstruct-vector-displaceable-struct (:type vector))
a b c)
* (type-of (make-defstruct-vector-displaceable-struct))
The only difference I see is that the structure accessors no longer
require simple-array. So it might not break Ironclad?
That said, here's a quick informal survey of accessor behavior
simple-array: sbcl (inhereted from cmucl), clisp, acl81, lispworks, ccl
array: ecl, xcl
So there's a strong trend towards the more restrictive behavior.