News for hackers. Stuff that matters.
Re:A Square Is Not A Rectangle by noblethrasher on Monday September 14, 2009 @03:54PM (#822479)
Studying functional programming can really illumniate certain concepts in object oriented programming. The solution is a sum type which you can simulate in OOP using an abstract base class (in C# parlance) and a set of sibling classes that derive from it. So, as other have mentioned, you could have an abstract Polygon (or quadralateral) base class

There are no comments on this comment yet.