The Best of OO: Clojure Types and Protocols

The best abstraction in OO is the interface: a pure specification that can the be implemented polymorphically by many different callees. Clojure's types and protocols generalize this idea to solve the expression problem. In this session you will learn:

  • What the expression problem is.
  • How the expression problem hurts your code every day, through wrappers, mixins, adapters, facades, open classes, and monkey patches.
  • How protocols solve the expression problem.
  • Ease of use matters: using protocols and types are as simple as classes and interfaces.
  • Performance matters too: protocols take advantage of the host environment's support for fast polymorphic dispatch.

Examples will include hands-on exercises for you to take home.


About Stuart Halloway

Stuart Halloway

Stuart Halloway is the CEO of Relevance, Inc. (www.thinkrelevance.com). With co-founder Justin Gehtland, Stuart helps companies adopt agile, as well as innovative technologies such as Clojure and Ruby on Rails. Stuart is the author of Programming Clojure, Rails for Java Developers, and Component Development for the Java Platform. Prior to founding Relevance, Stuart was the Chief Architect at Near-Time, and the Chief Technical Officer at DevelopMentor.

More About Stuart »