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
The default could just throw an Exception about there not being an impl like it does anyway. But maybe there's a use-case for customizing this behavior.
The text was updated successfully, but these errors were encountered:
I guess this might just have to be a plain old Clojure multimethod since it would be a low-level thing relative to the rest of Methodical. Not sure what is should dispatch off of... the multimethod var? How does this information get to the place where we dispatch? What happens for programmatically-defined methods? Maybe this should actually just be part of the options passed to defmulti (etc.) and then pass those along when we build the :dispatcher
I guess the only possible difference here instead vs writing a :default method would be that it wouldn't be visible as a next-method to anyone else. So this could be useful if you wanted to have some sort of more specific error message if there is no matching method than the default.
It was clearly intended that the call to no-applicable-methods be for value, rather than for effect. It just wasn't actually specified that way anywhere.
It seems like :default fits the "call for value" usage. So the main use case here would probably be for effect.
CLOS has this.
The default could just throw an Exception about there not being an impl like it does anyway. But maybe there's a use-case for customizing this behavior.
The text was updated successfully, but these errors were encountered: