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

Enhance docs on type piracy #51669

Open
lgoettgens opened this issue Oct 11, 2023 · 0 comments
Open

Enhance docs on type piracy #51669

lgoettgens opened this issue Oct 11, 2023 · 0 comments
Labels
docs This change adds or pertains to documentation

Comments

@lgoettgens
Copy link
Contributor

lgoettgens commented Oct 11, 2023

I would really like to have some enhanced documentation on type piracy, with some examples, common pitfalls, and maybe even ways to reorganize code to circumvent it.
I am unsure if this fits into https://docs.julialang.org/en/v1/manual/style-guide/#Avoid-type-piracy or should be placed somewhere else.

@mateuszbaran and @LilithHafner already contributed some relevant cases to cover in a discussion on automated type piracy detection in Aqua.jl (JuliaTesting/Aqua.jl#173 (comment)), but I think it would be better to have it in the official julia docs.

In particular, some information about foo(Vector{<:SomeAbstractType}) adding a dispatch of the form foo(Vector{Union{}}) would be great. (x-ref Nemocas/AbstractAlgebra.jl#1466). See also #33780

@brenhinkeller brenhinkeller added the docs This change adds or pertains to documentation label Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

No branches or pull requests

2 participants