You're doing it wrong. See the Open Closed Principle.
Poor design methodology will turn a home project into a total mess just as fast as a large scale project. "It's just home brew," is never a good excuse to cut corners.In addition the rest of the things you said are true again, but for large scale proojects, with full production that goes to clients.
This here is a home project.
An unnecessary one. You're missing the point of OO: reuse.The switch function is a downn scaled implementation to what the SignalMapper is doing, but tailored to the specific application.
And your method has the most. You forgot to measure maintenance in your complexity evaluation. Further you didn't take into account that there now needs to be TWO versions of set_m(), one that depends on there being a signal generator, the other that can be called by client code directly.And they have to be weighed against the "design overhead".
It hasn't changed. They could change it to be based on some sort of ID though and I'd be saying the same thing. The pattern itself is flawed, the fact that it doesn't work as specified is just an implementation detail.Originally Posted by squidge
Bookmarks