StructArrays.jl
StructArrays.jl copied to clipboard
Feature request: Base.empty and Base.emptymutable
Some generic functions, like in SplitApplyCombine.jl, construct their return values from Base.empty or Base.emptymutable. It would be nice if these were implemented for StructArrays to not always end up with Arrays of Structs.
Not to discourage adding such methods here, but:
Assuming you are talking about functions SplitApplyCombine.group and SplitApplyCombine.innerjoin, try FlexiGroups.jl and FlexiJoins.jl respectively. They do better in preserving container types and also often are more performant. These Flexi* packages were actually born because I found SplitApplyCombine not general enough for my usecases.
Thanks for the tip (and for writing these packages!), I will try them out :).
The empty methods should work out of the box with https://github.com/JuliaLang/julia/pull/49958. There should not need to be extended here
See also #238