You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
16:10 < Bike> simple-array definition question. clhs make-array says that if :displaced-to is nil, the new array is not a
displaced array. but clhs array-displacement says it can, depending on implementation, return something for
arrays that were made with :displaced-to nil
16:10 < Bike> am i missing something here
16:15 < phoe> clhs make-array
16:15 < specbot> http://www.lispworks.com/reference/HyperSpec/Body/f_mk_ar.htm
16:15 < phoe> "If make-array is called with adjustable, fill-pointer, and displaced-to each nil, then the result is a simple
array."
16:16 < phoe> oh wait. wrong quote.
16:16 < beach> Bike: See the Cleanup issue.
16:17 < beach> Some implementations implicitly displace some arrays. (For example, adjustable arrays might be represented as
displaced arrays.) Permitting ARRAY-DISPLACEMENT to return non-NIL for those arrays allows those
implementations not to have to record some additional information in the array about whether an explicit
:DISPLACED-TO was provided.
16:17 < beach>
16:17 < beach>
16:17 < beach>
16:17 < beach> Oops, sorry.
16:18 < Bike> That's what I thought, but I don't understand how that's allowed by the definition of make-array
16:18 < Bike> which cleanup issue do you mean?
16:18 < beach> Bottom of the page on array-displacement.
16:19 < beach> If you pass :adjustable t, then the implementation may create a displaced array.
16:19 < beach> clhs array-displacement
16:19 < specbot> http://www.lispworks.com/reference/HyperSpec/Body/f_ar_dis.htm
16:19 < beach> http://www.lispworks.com/documentation/HyperSpec/Issues/iss132.htm
16:19 < beach> http://www.lispworks.com/documentation/HyperSpec/Issues/iss132_w.htm
16:22 < Bike> i understand that, what i don't get is the apparently clear prohibition on make-array: "If displaced-to is nil,
the array is not a displaced array."
16:23 < Bike> is that just wrong? or does "displaced array" not mean "array that returns something from array-displacement"?
16:23 < beach> The latter.
16:24 < Bike> oh, okay.
16:24 < beach> But, honestly, I think they got it wrong. The two pages were probably written at different times.
16:24 < Bike> okay.
16:25 < beach> Note to self: Define "displaced array" better in WSCL.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: