Wednesday, December 22, 2010

Clojure Protocols vs Scala Structural Types

Programmer Question

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?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails