Talk:Covariance through renaming
Revision as of 02:38, 22 February 2007 by Eiffel (Talk | contribs) (Renaming not essential; precondition is what makes this work)
The key insight here is that it is inappropriate and unworkable to try to use the type system to model the eating habits of herbivores. Any real-world animals will have eating preferences too complex to model through the type system anyway, even if it did not cause catcalls.
The precondition "likes" solves the problem. And once you have the problem solved this way, there is no need for the renaming and the introduction of new, unrelated 'eat' features in descendants. Just redefine "likes" for each kind of animal. Eiffel 12:38, 22 February 2007 (CET)