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
Copy file name to clipboardexpand all lines: content/reference/protocols.adoc
+1
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,7 @@ A protocol is a named set of named methods and their signatures, defined using h
51
51
** all are namespace-qualified by the namespace enclosing the definition
52
52
* The resulting functions dispatch on the type of their first argument, and thus must have at least one argument
53
53
* defprotocol is dynamic, and does not require AOT compilation
54
+
* Note: primitive type hints are not supported on protocol functions
54
55
55
56
https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/defprotocol[defprotocol] will automatically generate a corresponding interface, with the same name as the protocol, e.g. given a protocol my.ns/Protocol, an interface my.ns.Protocol. The interface will have methods corresponding to the protocol functions, and the protocol will automatically work with instances of the interface.
0 commit comments