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

Export and document emptymutable #46230

Open
andyferris opened this issue Jul 31, 2022 · 0 comments
Open

Export and document emptymutable #46230

andyferris opened this issue Jul 31, 2022 · 0 comments

Comments

@andyferris
Copy link
Member

The empty API occassionally gets used defined immutable containers, like StaticArrays' SVector and MVector. Internally, we use Base.emptymutable to construct arrays (and sets/dicts) that we are about to use push! etc to modify. I think it would be healthy if we:

  1. Document what emptymutable is, how it differs to empty, and how it gets used internally
  2. Export and maintain it with the expectation that external users will call and extend it

From an external point of view, emptymutable can seem like an unstable, internal API that shouldn't be leveraged, but I feel the status quo gives the wrong impression. See e.g. JuliaData/SplitApplyCombine.jl#54 (and related JuliaArrays/StructArrays.jl#238).

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

1 participant