Does this mean that this is a bug or something crucial related to protocol design is preventing this ever being implemented?
Jun 6, 2016, 10:23:04 PM6/6/16
Reply to author
Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
Just guessing from past experience in the Clojure internals:
Instrumenting protocol methods it likely possible, but unlikely to be worth the effort.
There are already a bunch of places where protocol functions are different. The accepted convention is to always wrap a protocol method with a normal function to recover the benefits. The pattern usually looks like:
(-foo [x y z]))
(defn foo [x y z]
(-foo x y z))
Put your spec on foo, not -foo.
This tends to be good practice anyway because you have a place to wrap global behavior around -foo.