Comment made by: wagjo
I don't think we need it. What's the rationale behind extending some protocol, not implementing its methods, and then calling those methods, expecting them not to throw. Be explicit about what yout type should do, whether it is a default or custom behavior. You basically have three options
`
(defn default-foo
[this]
:foo)
(defprotocol P
(-foo [this]))
(deftype T
P
(-foo [this] (default-foo))
(defn foo
[x]
(-foo x))
`
or
`
(defprotocol P
(-foo [this]))
(deftype T)
(defn foo
[x]
(if (satisfies? P x)
(-foo x)
:foo))
`
or
`
(defprotocol P
(-foo [this]))
(extend-protocol P
java.lang.Object
(-foo [this] :foo))
(deftype T)
(defn foo
[x]
(-foo x))
`
I think however that my first approach is unidiomatic and you should prefer the latter ones.