Best practice way to check if method is defined for given arguments

What’s the clean, best-practice way to check if a method is defined for a given set of arguments, from within package code? I want to check if certain required methods/traits are implemented for given arguments/types before running an algorithm that uses them at deeper levels, to provide the user with an instructive high-level error message like “you should implement …” or “the following is required for …” instead of low-level “no method matching …” errors thrown from low-level functions.

Would using @which be considered a clean solution?

applicable maybe?

2 Likes

That’s it, thanks!