You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Currently I define default methods for specific types, e.g.
getx(::AbstractVector)
, but perhaps its smarter to just definegetx(p) = p[1]
as a default and trust that users can redefine if needed, rather than throwing aMethodError
. 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.
The text was updated successfully, but these errors were encountered: