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.
This might be true, but you probably have to revisit such code less frequently, and have less of it.
-
-
Not sure which code you mean. I do have less maximally polymorphic code than just plain bad code. My argument is not against maximal polymorphism, but against unnecessary maximal polymorphism. Why abstract over something that is always going to be concrete?
-
Here's a concrete example: I have modelled a kind of processing as A => B, where A is *always* going to be a String and B is always going to be one of 3 possible types. Rewriting that to String => SomeSumType is no less correct, more expressive, and far more understandable.
End of conversation
New conversation -
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.