Lably
Skip to content

Double dispatch

Feature in programming languages

  • 40 min read
  • 3 chapters

Related on Lably

Through Object-oriented programming, Function overloading and Simulation

Dan Ingalls first described how to use double dispatching in Smalltalk, calling it multiple polymorphism.

Overview

The general problem addressed is how to dispatch a message to different methods depending not only on the receiver but also on the arguments.

To that end, systems like CLOS implement multiple dispatch. Double dispatch is another solution that gradually reduces the polymorphism on systems that do not support multiple dispatch.

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication