O'Reilly logo

Clojure in Action by Amit Rathore

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14. Protocols, records, and types

 

This chapter covers

  • An overview of the expression problem
  • A custom solution to the expression problem
  • Clojure’s solution to the expression problem
  • A look at deftype, defrecord, reify

 

Abstraction is an important tenet of software development because it allows code that’s maintainable and extensible. Clojure itself is built on abstractions. For instance, most things in Clojure are coded to interfaces rather than being direct concrete implementations. This allows for reuse of code that expects those interfaces and allows the addition of more implementations to the mix.

Sooner or later, during your time on most projects, you’ll run into an abstraction-oriented issue known as the expression problem ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required