News for hackers. Stuff that matters.
Re:Class Hierarchies? Don't Do That by setrofim_ on Monday March 31, 2014 @04:11PM (#7503799)
Well, yes, indeed. It depends on the purpose of the abstraction. It may well be that Fly() should not be a method of Bird (maybe we need a FlyingBird subclass, or, even better, a Flying mix-in). My objection was to the "solution" of throwing InvalidOperation, not in support of the assumption that birds can necessarily fly (note the capitalization in may initial remark).

There are no comments on this comment yet.