Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!aiai!richard From: richard@aiai.ed.ac.uk (Richard Tobin) Newsgroups: comp.arch Subject: Re: MIPS, Compaq and Microsoft in bed - NYT story Message-ID: <4109@skye.ed.ac.uk> Date: 12 Feb 91 13:13:27 GMT References: <29920@usc> <45758@mips.mips.COM> <3188@crdos1.crd.ge.COM> Reply-To: richard@aiai.UUCP (Richard Tobin) Organization: AIAI, University of Edinburgh, Scotland Lines: 41 In article <3188@crdos1.crd.ge.COM> davidsen@crdos1.crd.ge.com (bill davidsen) writes: > What you are saying is that there are lots of poorly written >non-portable programs around which do bizarre non-portable things with >addresses, on the theory that because the {vax,sun,32k} has a linear >address space starting with zero, that "all that ANSI crap about pointers >doesn't mean much." (quote from one of my C students). Non-portable, certainly. But not necessarily badly-written. Most programs have no need to treat pointers in this way, but a very important class do: those which implement other languages. It's extremely common for Lisp systems, for example, to represent objects as a tagged word, consisting of a few bits (often 2, but sometimes as many as 8) describing the type (integer, symbol, cons etc) and the rest containing the address. This involves treating addresses as integers. For many of us, the fact that it's hard to port such a system to an 8086 or other segmented architecture merely inclines us to reject such processors. We've weighed up the advantages of portability against the disadvantage of having to use more cumbersome and probably less efficient implementation techniques, and you'll find us using vaxes, suns, mipses and sometimes 386s. It's also worth noting that such languages are often used for the implementation of programs requiring a huge address space. I'm delighted to see that MIPS is going straight to 64 bits for both pointers and integers, and hope that other manufacturers do the same. > And honestly, other languages which have pointers are not usually used >to perform these atrocities. Other languages seem to be able to convince >programmers that a pointer is not an int. And that's one reason why you'll usually find Lisp and Prolog implemented in C, not pascal. -- Richard -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nsfnet-relay.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin