Chapter 4. Polymorphism with multimethods by Amit Rathore

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 4. Polymorphism with multimethods

 

This chapter covers

  • What polymorphism means
  • What method dispatch is
  • Clojure multimethods and how they work

 

Many years ago, when I was learning the Java programming language, I read a book by Bruce Eckel called Thinking in Java. Although I thought it was a great book and learned a lot from it, over the years I’ve realized that the title of the book is a specific instance of a common curse. It’s a curse that afflicts a majority of program-mers—if programmers know only a specific language, they soon begin to think only in terms of what’s possible (expressible) in that language.

In our industry, this is manifested in several ways. The most common is that, on average, a programmer fluent in several ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required