Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!bionet!agate!riacs!stanford.edu!leland.Stanford.EDU!leland.Stanford.EDU!craig From: craig@leland.Stanford.EDU (Craig Chambers) Newsgroups: comp.object Subject: Re: A Hard Problem for Static Type Systems Message-ID: <1991Apr22.221039.2719@leland.Stanford.EDU> Date: 22 Apr 91 22:10:39 GMT References: <1991Apr20.010347.28984@leland.Stanford.EDU> <3378@charon.cwi.nl> <1991Apr22.015415.28303@leland.Stanford.EDU> <3392@charon.cwi.nl> Sender: news@leland.Stanford.EDU (Mr News) Reply-To: craig@self.stanford.edu Organization: Stanford University Lines: 15 In article <3392@charon.cwi.nl>, guido@cwi.nl (Guido van Rossum) writes: |> craig@leland.Stanford.EDU (Craig Chambers) writes: |> >How does the compiler know that "<" in min will work? |> |> From the definition of min it concludes that the arguments must be |> comparable to each other. The definition of the built-in "<" operator |> says that two types are comparable to each other if they are the same |> type. The "<" message was supposed to be a user-defined message, implemented differently by different objects/classes. But since ABC has no user-defined data types, this whole example doesn't make sense, and ABC can't express the general problem I'm trying to type-check. -- Craig Chambers