chris@mimsy.UUCP (Chris Torek) (01/22/89)
In article <284@bgalli.UUCP> bga@bgalli.UUCP (Billy G. Allie) writes: >I don't think C was designed for portablility. It was designed to allow a >reasonably high level language provide adequate access to the underlining >hardware so that WRITING CODE IN ASSEMBLER WOULD NOT BE NECESSARY. The >fact that UNIX is written mostly in C says to me that it acheived that >goal. I often wonder what Dennis Ritchie thinks of these attempts to stuff words in his mouth. . . . At any rate, I shall try to speak of what is, rather than what was meant to be. >... Portability is a useful goal for programs such as emacs and pcomm, >but not for an imbedded real-time control system that needs to have good >response times to external events. For such a project, portability can >take a flying leap off a high cliff. Sometimes---but it is well not to throw portability to the wolves, as it were, until the last. Among other things, it may let you change compilers. C eliminates much need for assembly coding, but certainly not all. It is possible to manipulate floating point bit patterns using either unions or type puns (via address casts). In `traditional' C compilers, this tends to produce poor code; if it is the central part of such a control system (although few control systems seem to use floating point), or has other real-time constraints, you may find that your C compiler does too poor a job anyway. You then face the choice of replacing or improving the compiler, or resorting to assembly coding. (And now for something completely irrelevant:) >7436 Hartwell, Dearborn, MI 48126 You live almost next door to my older brother (6834). How about that.... -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris
bph@buengc.BU.EDU (Blair P. Houghton) (01/24/89)
Ob. C-polemic: Given the differing compilers, C ain't strictly portable. It is (often) among unix machines running "unix is a trademark of at+t" clones, but I don't trust even my K&R(ed.1)-conformant code when going from an Encore/Ultrix to a VAX/VMS. In article <15573@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >(And now for something completely irrelevant:) > >In article <284@bgalli.UUCP> bga@bgalli.UUCP (Billy G. Allie) writes: > >>7436 Hartwell, Dearborn, MI 48126 > >You live almost next door to my older brother (6834). How about that.... Woontcha know. Torek's bother has a number for a name... --Blair "8-D"