Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix displaced array definition #27

Open
phoe opened this issue Aug 15, 2017 · 1 comment
Open

Fix displaced array definition #27

phoe opened this issue Aug 15, 2017 · 1 comment

Comments

@phoe
Copy link
Owner

phoe commented Aug 15, 2017

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.
@KZiemian
Copy link
Collaborator

So, what we need to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants