Clojure (Script) Static protocols?

The ClojureScript Om Next library uses static protocols . I have never seen this before, and I wonder if this is a special Om concept or the real part of the language. Here is a simplified snapshot of the code:

(deftype type
  static IProtocol
  (some-method [this] "val"))

What exactly does this do? (Entering it in REPL does not lead to any errors, so I am convinced that this is not Om specific).

+4
source share
1 answer

deftype - , Clojure. ​​ Java, . java - , , , , . defui - , deftype, Classes - JavaScript, . , . , , , .

+3

Source: https://habr.com/ru/post/1629291/


All Articles