Комментарии:
soggy code. nice. antithesis of DRY being: WET, or We Enjoy Typing, which I can tell you is not the case, if don't need to. I'd rather show the results of the tests.
ОтветитьOpen-Closed principle: is irrelevant if you own the code-base and you don't have any other external clients using the code. If someone knows when this might not be true, please let me know.
ОтветитьLiskov substitution... I understand what he's doing, but how would replacing every instance of an <abstract> class with one of the more specialized classes lead to the same behavior? This doesn't make any sense. And making the "Report" class not be abstract doesn't solve any problem either. Replacing any instance of a type with an instance of any of its subtypes changes behavior period. Seems like liskov simply says "Create abstract classes". While in my opinion, creating interfaces is better, even that doesn't have anything to do with the original definition.
Ответить