On Apr 5, 4:19 pm, Francogrex <······@grex.org> wrote:
> On Apr 5, 6:06 pm, Tamas K Papp <······@gmail.com> wrote:
>
> > CL-USER> (adjustable-array-p (make-array 5))
> > NIL
> > CL-USER> (adjustable-array-p (make-array 5 :fill-pointer 0))
> > T
>
> So in SBCL this should result in nil?
> (adjustable-array-p (make-array 5 :fill-pointer 0 :adjustable nil))
no, because the spec leaves an implementation free to return either an
array that is actually adjustable, or one that is not actually
adjustable if :adjustable is nil.
In the case of sbcl, the implementation uses this freedom to return an
array which is actually adustable. Since the array is actually
adjustable, adjust-array when called on this array could return a
value identical to this array, so adjustable-array-p returns t.
IOW, the constraint is stronger when :adjustable is t. The
implementation has more freedom when :adjustable is nil.
All of this is made clear in the hyperspec btw.