-
Notifications
You must be signed in to change notification settings - Fork 370
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
fix vcat type piracy #3457
fix vcat type piracy #3457
Conversation
This is still piracy though. You're now pirating yet another method, this time it should hopefully give desired behaviour, but this will likely end up causing problems. Fundamentally, the
that just isn't really allowed because you don't own |
I agree. I used the simplest solution. In general this is not a type piracy I think as I own |
Unfortunately, this is not really the case. At least according to the language devs, owning a parameter does not count as owning a type. So owning |
This is interesting. Could you please provide a reference for my further exploration. Thank you! |
This really needs to be documented better, but there's this: https://docs.julialang.org/en/v1/manual/style-guide/#Don't-overload-methods-of-base-container-types and also this sentence in the following section in piracy:
An easy aspect of this to overlook is that while you have defined the type See also this conversation: https://julialang.slack.com/archives/C688QKS7Q/p1723647223155419 and this one: https://julialang.zulipchat.com/#narrow/stream/225542-helpdesk/topic/is.20this.20type.20piracy.3F/near/313431232 Here's my understanding of what's wrong with this sort of 'parametric piracy': Let's suppose there's a |
@nalimilan - can we merge this PR as it is? |
Could you push a commit that moves the code and another one that changes the signature? Otherwise it will be hard to understand what changed when looking at the history. Maybe it would make sense to add tests with e.g. a |
761b2a9
to
34d8736
Compare
@nalimilan - OK. I did both. |
Thank you! |
Fixes #3456