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

Feature request: Base.empty and Base.emptymutable #285

Open
rakhusur opened this issue Nov 14, 2023 · 4 comments
Open

Feature request: Base.empty and Base.emptymutable #285

rakhusur opened this issue Nov 14, 2023 · 4 comments

Comments

@rakhusur
Copy link

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.

@aplavin
Copy link
Member

aplavin commented Nov 21, 2023

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.

@rakhusur
Copy link
Author

Thanks for the tip (and for writing these packages!), I will try them out :).

@jishnub
Copy link
Member

jishnub commented Dec 14, 2023

The empty methods should work out of the box with JuliaLang/julia#49958. There should not need to be extended here

@jishnub
Copy link
Member

jishnub commented Dec 15, 2023

See also #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

3 participants