HaloO,
Darren Duncan wrote:
What is the point of declaring a type as Rectangle, with those
limitations, if you are going to mutate it into not being a Rectangle.
There are three issues:
1) the subtyping relation
2) the preservation of object identity
3) the mutating add_vertex method
Callin
At 1:24 PM +0100 11/10/06, TSa wrote:
HaloO,
I wonder how an object can change its type without loosing its
identity. Consider two types Rectangle and Polygon with Rectangle
a subtype of Polygon. Now if there is a method add_vertex in the
Polygon type, calling it on a Rectangle warps the object