Re:A Square Is Not A Rectangle
by JulianMorrison on Tuesday September 15, 2009 @08:41AM
(#823712)
My Haskell way of thinking of it would be that Square and Rectangle are distinct (non-inheriting) data types, Square and Rectangle are both instances of the type-class Rectangular (which inherits and provides default functions for Closed and Polygonal), Square has a transformation into Rectangle, and Rectangle has a transformation into Maybe Square.
[ Parent
| on HN ]
There are no comments on this comment yet.