ArrayInterface.jl
ArrayInterface.jl copied to clipboard
Should we have pop, push and friends?
StaticArrays has all of these non-mutating versions of typically mutating methods implemented, which might be a good fit for this package since we have setindex. It would be nice if these were available outside of a dependency on StaticArrays and part of the general array interface.
Out of curiosity, what do you think of BangBang.jl?
It maybe nice to try and support a more uniform interface, e.g. x = push!!(x, 2).
Of course, the methods changing the data structure's length won't be type stable for anything typed by size.
I hope @tkf doesn't mind getting pinged here, in case he'd like to give feedback or suggestions on a general interface. Also because I wonder if this would be somewhat of a fracturing of these sorts of methods between ArrayInterface and BangBang.
Ive always liked the syntax of BangBang but have never ended up using it. It might become more convenient as Julia gets more immutable collections though.
I also don't see what other possible meaning that syntax could reasoanably have, so it seems like a pretty safe thing to commit to if we moved forward with it.