Cyrus Harmon wrote:
> but whether or not the :adjustable arg defaults to nil says nothing
> about whether or not the array will actually be adjustable.
>
> In particular, from clhs:make-array:
>
>> If adjustable is non-nil, the array is expressly adjustable (and so
>> actually adjustable); otherwise, the array is not expressly
>> adjustable (and it is implementation-dependent whether the array is
>> actually adjustable).
To further clarify, in SBCL all displaced arrays and arrays with
fill-pointers are actually adjustable.
...and no, this should not be relied on. If you need an adjustable
array, just say ":ADJUSTABLE T".
Cheers,
-- Nikodemus
> and
>
>> There is no specified way to create an array for which adjustable-
>> array-p definitely returns false. There is no specified way to
>> create an array that is not a simple array.
>
> Cyrus
>
> On Jul 4, 2007, at 8:31 PM, Patrick May wrote:
>
>> While testing in LispWorks some code developed under SBCL, I found
>> that the following expression:
>>
>> (adjustable-array-p (make-array 0 :element-type 'list :fill-pointer
>> t))
>>
>> returns T under SBCL and NIL under LispWorks. The Hyperspec says
>> that :adjustable in make-array is NIL by default. Is this a bug or
>> deliberate choice in SBCL?
>>
>> Regards,
>>
>> Patrick
>>
>> ----
>> pjm@...
>> S P Engineering, Inc.
>> Large scale, mission-critical, distributed OO systems design and
>> implementation.
>> (C++, Java, Common Lisp, Jini, middleware, SOA)
>>
>>
>>
>> ----------------------------------------------------------------------
>> ---
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Sbcl-help mailing list
>> Sbcl-help@...
>> https://lists.sourceforge.net/lists/listinfo/sbcl-help
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Sbcl-help mailing list
> Sbcl-help@...
> https://lists.sourceforge.net/lists/listinfo/sbcl-help
|