Yes, I totally agree with you. That is why I said “It is still not convenient”. Wish new feature could be introduced, like “local import” to limit the survival scope of type piracy bonding to the reloading package.
I personally think the idea with passing a function mentioned above is the Julian way to go.
The approaches you present are still type piracy and in my opinion not really elegant.
For your argument that some package developer might not have your use case of changing such a function in mind – you could still either define your own alternate outer function c
(calling it different and accepting functions as arguments) – or do a PR on the package proposing the new variant of passing down functions, since it might be of interest for others as well.
2 Likes