Xref: utzoo comp.object:3373 comp.lang.misc:7627 comp.lang.eiffel:1545 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!wuarchive!udel!ee.udel.edu From: new@ee.udel.edu (Darren New) Newsgroups: comp.object,comp.lang.misc,comp.lang.eiffel Subject: Re: A Hard Problem for Static Type Systems Message-ID: <51986@nigel.ee.udel.edu> Date: 26 Apr 91 22:23:22 GMT References: <1991Apr20.010347.28984@leland.Stanford.EDU> <554@eiffel.UUCP> Sender: usenet@ee.udel.edu Followup-To: comp.object Organization: University of Delaware Lines: 33 Nntp-Posting-Host: estelle.ee.udel.edu In article <554@eiffel.UUCP> bertrand@eiffel.UUCP (Bertrand Meyer) writes: >by craig@leland.Stanford.EDU (Craig Chambers): >> Here's the problem: we'd like to describe the type of the min >> function >one could define `min' in that class as > min (other: like Current): like Current is Doesn't look like you've answered the question here. What's the type of `min'? All you've shown is how Eiffel can express restrictions on the patterns of inputs that min can accept and the type that min will return given certain input types. You have not said what the type of min is. In Smalltalk, I can say Class Mary method zelda: thing code ^ thing and say that the zelda: message will always return the same type as its argument. That doesn't make Smalltalk statically typed. I'm not bashing Eiffel. I don't even know Eiffel. Maybe the response would be obvious if I *did* know Eiffel. But so far, it looks like `min' is a dynamically-typed function. (Either that, or it is a polymorphic function, at which point the *declaration* is dynamically typed and the *application* is statically typed; i.e. "min(other : like Current)" is dynamically typed, but "min(3,5)" is statically typed as an integer and "min(<<3,4>>,<<5,6>>)" is statically typed as a list.) -- Darren -- --- Darren New --- Grad Student --- CIS --- Univ. of Delaware --- ----- Network Protocols, Graphics, Programming Languages, FDTs ----- +=+ Nails work better than screws, when both are driven with hammers +=+