Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubin From: hrubin@pop.stat.purdue.edu (Herman Rubin) Newsgroups: comp.lang.misc Subject: Re: Machine Language Typing (Was Re: A Hard Problem for Static Type Systems) Message-ID: <11858@mentor.cc.purdue.edu> Date: 3 May 91 22:16:36 GMT References: <2392@optima.cs.arizona.edu> <3156@opal.cs.tu-berlin.de> Sender: news@mentor.cc.purdue.edu Lines: 30 In article , olson@juliet.ll.mit.edu ( Steve Olson) writes: > In article stephen@estragon.uchicago.edu (Stephen P Spackman) writes: > I have to disagree. A good machine language (one with no Catch Fire & > Burn instructions) for a machine without programmer-visible caching is > both strongly and statically typed, simply by virtue of the fact that > all consequences of a given machine state are defined. You are making > the mistake of imagining that addresses and ints and so forth exist in > object code; but they don't. Those are abstractions in your mind. > Ultimately they are NOT represented in the machine model. Bits go > here, bits go there, the memory holds bits and nothing else. The > (only) data type is the bit.... > > If one puts an integer into a floating point instruction, one might > get a deteriminstic result. But so what? The result wouldn't be > meaningful. I might as well argue the only real data type is the > voltage level. It depends. I deliberately do things like this, but most often using integer operations on floats. Of course the results are machine dependent, but so what? However, putting integers into floating instructions can be useful if those integers are read by the machine as the desired floating numbers. Now suppose I do an integer operation on floats. Is the result float or integer? Both are useful, and I expect any good mathematical programmer to be able to use these profitably. -- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399 Phone: (317)494-6054 hrubin@l.cc.purdue.edu (Internet, bitnet) {purdue,pur-ee}!l.cc!hrubin(UUCP)