Xref: utzoo comp.object:3292 comp.lang.misc:7569 comp.lang.eiffel:1527 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!pacbell.com!decwrl!parc!boehm From: boehm@parc.xerox.com (Hans Boehm) Newsgroups: comp.object,comp.lang.misc,comp.lang.eiffel Subject: Re: A Hard Problem for Static Type Systems Message-ID: Date: 22 Apr 91 22:19:34 GMT References: <1991Apr20.010347.28984@leland.Stanford.EDU> Sender: news@parc.xerox.com Organization: Xerox PARC Lines: 15 Aside from syntactic issues, this doesn't seem very hard in languages like Russell, Quest, or Poly. I either need a built-in type number, or I need to explicitly define something that is the tagged union of integers and floats. (The tag may be a method suite.) I then define min to take a type (or algebra, or your favorite term...) with a "<" operation and its two "real" arguments. (When I apply min, the type argument can be inferred.) This forces a static check that the two argument types are the same. This still involves at least some dynamic method selection. But that seems inherent in the problem. Whether you consider these languages to be practical is a matter of taste. They have all been used to build nontrivial programs. Hans