Talk:Covariance through renaming

Revision as of 08:43, 22 February 2007 by Manus (Talk | contribs) (Added comment)

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.