Clojure Protocols vs Scala Structural Types
Posted
by
Vasil Remeniuk
on Stack Overflow
See other posts from Stack Overflow
or by Vasil Remeniuk
Published on 2010-12-22T10:16:47Z
Indexed on
2010/12/22
20:54 UTC
Read the original article
Hit count: 525
After watching the interview with Rich Hickey on Protocols in Clojure 1.2, and knowing very little about Clojure, I have some questions on Clojure Protocols:
- Are they intended to do the same thing as Structural Types in Scala? What benefits do Protocols have over Structural Types (performance, flexibility, code clarity, etc.)? Are they implemented through reflections?
- Questions on interoperability with Scala: Can Protocols be used instead of Structural Types in Scala? Can they be extended (if 'extension' term can be applied to Protocols) in Scala?
© Stack Overflow or respective owner