JuliaData / DataAPI.jl

A data-focused namespace for packages to share functions
Other
33 stars 13 forks source link

Document requirements for the refpool return value #24

Closed nalimilan closed 4 years ago

nalimilan commented 4 years ago

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.