Christian Tietze

  • Posts
  • Books
  • Apps
  • Work With Me
  • Contact

Use Double-Dispatch and Polymorphism to Get Rid of Conditionals

Feb 9th, 2015

I want to point out a particular refactoring Jimmy Bogard shows in his video I mentioned last time. Jimmy transforms a switch statement into a double-dispatch method call, making use of good old polymorphism to deal with variety of options. We’ll see what these terms mean when applied.

Continue reading …

  • ∞ Permalink
  • • Comments
  • • Tags:
    • polymorphism
    • domain-model

Contact • Newsletter • blog post feed
Become an affiliate • Legal Information • Twitter

Except where otherwise noted, content on this site is licensed CC BY-SA 4.0.