Google Groups

Re: Any ways to prevent protocol functions from being hardcoded in?

Stuart Sierra Jun 30, 2011 5:54 AM
Posted in group: Clojure
Yeah, inline method definitions in a deftype/defrecord are compiled right into the generated class; no Vars involved. That's why they're fast.

Recently the received wisdom has been: protocols are a low-level implementation detail. Actual APIs should be built with normal functions that call the protocol methods.

-Stuart Sierra