Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!uwvax!oddjob!hao!noao!mcdsun!sunburn!gtx!al From: al@gtx.com (0732) Newsgroups: comp.lang.c Subject: Re: Portable C vs Efficient C or "Cost of Portability" Message-ID: <215@gtx.com> Date: Fri, 17-Apr-87 16:37:22 EST Article-I.D.: gtx.215 Posted: Fri Apr 17 16:37:22 1987 Date-Received: Sun, 19-Apr-87 18:02:37 EST References: <213@pyuxe.UUCP> <636@edge.UUCP> <1316@frog.UUCP> <658@edge.UUCP> Reply-To: al@gtx.UUCP (Al Filipski) Organization: GTX Corporation, Phoenix Lines: 49 doug@edge.UUCP (Doug Pardee) writes: > consider this: There are 4 basic reasons for writing a particular program > in C instead of in assembler: > a) If efficiency is of little consequence -- the program is only going tome > be run once or twice; > b) If portability is important; > c) If the programmer is ignorant of assembler; or > d) If the boss wants "BIC lighter" programmers: cheap, disposable, and > easily replaceable. One important reason not mentioned above is development time. Unless there are unusual efficiency considerations, The C programmer can program rings around the assembly language programmer because there are fewer low-level discriminations to be made. A well-known folk theorem of computer science says that it takes about as long to write and debug one line of, say, Fortran or C as one line of assembly language. Since the assembly language program is considerably longer, it takes longer to write. > A C program is no more readable to a C programmer than an assembler program > is to an assembler programmer. Ditto for maintainability. The issues of > Readability and Maintainability come back to points (c) and (d) above; in > other words, whether we're talking about C programmers or assembler > programmers. "Higher-level" languages such as C and Fortran were all designed and implemented by exceptionally competent ASSEMBLY LANGUAGE PROGRAMMERS disgusted by the unreadability and unmaintainability of assembly language. Portability was always a secondary issue. > And finally, <<>> all of the above was > based on "programmers of equal competency". But consider that point (d) > above virtually guarantees that the ever-increasing pool of marginally > competent programmers (you know the ones, "I got me a PeeCee and learnt > meself how to program in Basic and C") will be hired by penny-pinching > companies to program in C. At least the kid with the PC is educable. Spare me from the hardware retread who *knows* that all there is to programming is learning the op-codes for the processor. -------------------------------------------------------------- | Alan Filipski, GTX Corporation, Phoenix, Arizona 85283, USA | | ihnp4!arizona!sunburn!gtx!al -------------------------------------------------------------- God took seven days to create the world; an APL programmer could do it in one line.