Skip to content

Conversation

tkf
Copy link
Member

@tkf tkf commented Nov 15, 2019

I propose to get rid of the default ismutable(x::DataType) = x.mutable. An array type implemented with immutable struct does not mean the array is immutable (e.g., sparse arrays #27). Like wise, it is imaginable to implement semantically immutable array using mutable struct.

So, I think it would be nice to have a sane and predictable default. Here, I suggest to treat arrays as mutable by default. This way, missing definition of ismutable is an error, rather than a slow or incorrect computation.

Copy link
Member

@ChrisRackauckas ChrisRackauckas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

@tkf
Copy link
Member Author

tkf commented Nov 15, 2019

Thanks, good to know that you are OK with the change. After this is merged, can you release the package soon? I'd like to use it from JuliaFolds/BangBang.jl#48

@ChrisRackauckas ChrisRackauckas merged commit b32df8d into JuliaArrays:master Nov 15, 2019
@tkf tkf deleted the ismutable branch December 10, 2019 02:33
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

Successfully merging this pull request may close these issues.

2 participants