Had to work with some code I wrote a few years ago where I went maximally polymorphic for the hell of it - it was just as painful as when working with badly documented and poorly tested dynamically checked code.
That's the problem, though: you may have to change the call site in another (unrelated) location now. You may have to make a breaking change to an API which would not have been necessary if you had written the generalized version from the outset.
-
-
It's a trade off. When the cost (in terms of readability) of generalisation is low, I'll go for it. When it's high with no immediate benefit, I won't. An API that no one will ever change because it's too obscure for anyone to understand is not protected - it's frozen.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.