Warning — toy example!
Some real case study examples appear later.
Better would be:
= aRectangle
^ self species = aRectangle species
and: [self origin = aRectangle origin]
and: [self corner = aRectangle corner]
NB: TRectangle only uses accessors to access state. The original Rectangle code may need to be adapted.
Glue is needed to fulfil trait requirements, here implemented by accessors