Talk:Covariance through renaming
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)
--manus 17:43, 22 February 2007 (CET) One of the issue of the proposal is that it is more or less what the other languages are currently using to fake covariance. So Eiffel would not be in a better position, this is why I think we should find a solution not involving the addition of new routines.
- I really cannot understand what 'fake covariance' is. We are facing a modelling problem and that needs to be adequately solved. My suggestion tries to show that there is a certain class of problems that are normally called good examples for the need of covariance (CAT_SKIPPER, ANIMAL/COW) that can be solved purely by renaming, without any loss of precision or generality. The problem of 'implicit covariance' through generic parameters seems to be the only reason to support covariance (although this is indeed a hard problem). --Schoelle 19:54, 22 February 2007 (CET)