Skip to content

Conversation

@MasonProtter
Copy link
Contributor

@MasonProtter MasonProtter commented Sep 19, 2022

AbstractArrays have never been required to be mutable, and we have many subtypes of AbstractArray in Base and LinearAlgebra that do not implement setindex! since they are immutable, or only implement it for a subset of their indices (e.g. CartesianIndices, the various range types, Symmetric, Hermitian, Diagonal, ). There is also a lot of hope and plans for more immutable, dynamic array support from Base, and of course a rich set of immutable arrays out there in the package ecosystem which do not have setindex!

As far as I can tell, it is simply a false characterization of the AbstractArray interface to say that setindex! is not an optional method.

This PR will move the two lines in the red box here to the Optional methods section, between IndexStyle and the getindex on non-scalar indices.
image

@ViralBShah ViralBShah added the docs This change adds or pertains to documentation label Sep 20, 2022
@ViralBShah ViralBShah merged commit d7158dc into JuliaLang:master Sep 21, 2022
@MasonProtter MasonProtter deleted the patch-8 branch September 21, 2022 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs This change adds or pertains to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants