[Haskell-beginners] Program reliability and multiple data constructors; polymorphism

Stephen Tetley stephen.tetley at gmail.com
Wed Apr 18 19:51:48 CEST 2012

Further to my last point - introspection is "controversial" for Shapes
if you have a concrete representation anyway:

If you want to make an ellipse you can non-uniformly scale a
circle[*], but if you only have a query for radius you can't do edge
detection on an ellipse; you might end up needing to store radius plus
a list of all the affine transformations you have applied.

[*] There is also the problem that a circle isn't a circle once it has
been non-uniformly scaled...

More information about the Beginners mailing list