Talk:Covariance through renaming

Revision as of 06:08, 22 February 2007 by Schoelle (Talk | contribs)

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)

Which does not solve the problem of covariant arguments, for example when you want to add a postcondition to 'eat' the needs to talk about the fact that grass was eaten. --Schoelle 15:08, 22 February 2007 (CET)