Without supporting keys and related functions, refpool is useless. In practice, experience from DataFrames and Arrow shows that the object should be iterable (otherwise one would need to collect it to a vector before passing it to many functions) and support eltype.
Also document that equality refers to isequal and that the object is supposed to be of the same type as the original, which was previously implied by "is the appropriate original value" without being explicit.
It would be simpler to just say that the returned object should implement the AbstractArray interface, though it's more demanding as things like similar are a bit hard to get right if you don't actually subtype AbstractArray.
Without supporting
keys
and related functions,refpool
is useless. In practice, experience from DataFrames and Arrow shows that the object should be iterable (otherwise one would need to collect it to a vector before passing it to many functions) and supporteltype
.Also document that equality refers to
isequal
and that the object is supposed to be of the same type as the original, which was previously implied by "is the appropriate original value" without being explicit.It would be simpler to just say that the returned object should implement the
AbstractArray
interface, though it's more demanding as things likesimilar
are a bit hard to get right if you don't actually subtypeAbstractArray
.