Xref: utzoo comp.lang.misc:7127 comp.object:2933 comp.lang.eiffel:1475 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!ni.umd.edu!uc780.umd.edu!cs450a03 From: cs450a03@uc780.umd.edu Newsgroups: comp.lang.misc,comp.object,comp.lang.eiffel Subject: RE: CHALLENGE: heterogeneous collections Message-ID: <27MAR91.23472366@uc780.umd.edu> Date: 27 Mar 91 23:47:23 GMT References: <1991Mar25.220525.11087@leland.Stanford.EDU> <1991Mar26.101051.29527@irisa.fr> <519@eiffel.UUCP> <1991Mar28.030354.25051@leland.Stanford.EDU> Sender: usenet@ni.umd.edu (USENET News System) Organization: The University of Maryland University College Lines: 11 Nntp-Posting-Host: uc780.umd.edu Urs Hoelzle writes: >Suppose you have two classes T and SubT, where SubT is a subtype of T >(in the strict sense of `subtype'). You also have the lists > ... >Now the problem: List[T] is not a subtype of List[SubT] because of the >insert method (contravariance). Thus, someProc(listB) is illegal even > ... That's not a problem, that's a slice of code. Raul Rockwell