2 ms·
> Protocols in Clojure are similar to Java Interfaces, though not quite. Basically a protocol is a contract, a set of functionalities without any implementation
by signa11 16y ago
> Protocols in Clojure are similar to Java Interfaces, though not quite. Basically a protocol is a contract, a set of functionalities without any implementation
how is this different from Go's implementation of an 'interface' type http://golang.org/doc/go_for_cpp_programmers.html#Interfaces http://golang.org/doc/go_for_cpp_programmers.html#Interfaces
- zaph0d 16y agoI asked Rich Hickey and this is what he had to say - "they differ from Go interfaces in that Go just uses method conformance to determine interface support (vs explicit declaration of 'I implement this protocol'), and Go's interfaces, last time I checked, were only 'open' within a module."