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

Avoid type piracy by defining distinct functions #814

Open
martinholters opened this issue Nov 29, 2023 · 0 comments
Open

Avoid type piracy by defining distinct functions #814

martinholters opened this issue Nov 29, 2023 · 0 comments

Comments

@martinholters
Copy link
Member

As argued by @KristofferC ion #811 (comment) (and I tend to agree), Compat should not commit type piracy by adding methods to Base functions for Base types, but rather define distinct functions of the same name, so that usage needs to be explicit opt-in (by qualification or explicitly named using).

This is different from how we used to do it, by I think it's worthwhile.

If we agree to do it this way, we should start by applying this rule to any new features. I'm not sure we should also go to the trouble of deprecating the old style in favor of the new style for existing features. Anyway, this likely warrants some discussion before setting anything in motion.

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

1 participant