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

Add better default methods for interface methods #62

Closed
DanielVandH opened this issue Jun 16, 2023 · 0 comments · Fixed by #103
Closed

Add better default methods for interface methods #62

DanielVandH opened this issue Jun 16, 2023 · 0 comments · Fixed by #103

Comments

@DanielVandH
Copy link
Member

DanielVandH commented Jun 16, 2023

Currently I define default methods for specific types, e.g. getx(::AbstractVector), but perhaps its smarter to just define getx(p) = p[1] as a default and trust that users can redefine if needed, rather than throwing a MethodError. If this is done, I should provide a function that allows a user to test their interface matches the package's assumptions correctly.

Should also check if any methods really need to exist or can be better defined. Really just need to put a lot more thought into this overall for the longevity of the package.

@DanielVandH DanielVandH mentioned this issue Jun 16, 2023
7 tasks
@DanielVandH DanielVandH linked a pull request Apr 14, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant