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

Should aux methods be unique per qualifier + dispatch value? #100

Open
camsaul opened this issue Aug 18, 2022 · 1 comment
Open

Should aux methods be unique per qualifier + dispatch value? #100

camsaul opened this issue Aug 18, 2022 · 1 comment

Comments

@camsaul
Copy link
Owner

camsaul commented Aug 18, 2022

It gets super confusing when you have multiple aux methods with the same dispatch value, and it can lead to weird gotchas if you rename a namespace or remove them. It's also indeterminate which order they're applied in...

I think there are some valid use cases for things like multiple :around :default methods for logging and other things like that. How can we still support that case?

Maybe we should make the unique key something you can optionally supply yourself, and by default it's nil. So if you want to do something weird you can supply a unique key to prevent it from getting stomped on. Altho I'm not sure that would really solve the renaming namespaces issue.

@camsaul
Copy link
Owner Author

camsaul commented Sep 9, 2022

I like the idea of nil being the default unique key

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