Classes vs. Data Structures
In the data structure scenario the two implementations of the function are together in the same function, they don’t “belong” (however you mean that word) to the type. The caller of the function depends upon the source file with the switch statement which depends upon all the implementations. A change to any one of the implementations will cause the source file with the switch statement to be recompiled, which will cause everyone who calls that switch statement – the function in our case – to be recompiled.
Source: blog.cleancoder.com