Use Double-Dispatch and Polymorphism to Get Rid of Conditionals
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 …