Path: utzoo!attcan!uunet!husc6!mailrus!iuvax!bobmon From: bobmon@iuvax.cs.indiana.edu (RAMontante) Newsgroups: comp.misc Subject: Re: Basics of Program Design Message-ID: <10981@iuvax.cs.indiana.edu> Date: 26 Jul 88 16:10:31 GMT Reply-To: bobmon@iuvax.UUCP (RAMontante) Distribution: na Organization: Computer Science Dept., Indiana University Lines: 49 cjl@ecsvax.uncecs.edu (Charles Lord) writes: >In article <182@quintus.UUCP>, ok@quintus.uucp (Richard A. O'Keefe) writes: >> No part of the design of C caters to the PDP-11. >> C is BCPL > ... >> and (b) history is against you: C's designers claim that they put this >> feature in *before* they got a PDP-11. > >WRONG. C *was* based on BCPL which predates the '11 *but* >K&R state in the Preface to THE book, 1st ed: > "C was originally designed for ... UNIX ... on the DEC PDP-11, > by Dennis Ritchie" In 2nd ed., it still says "C was originally designed for and implemented on the UNIX operating system on the DEC PDP-11, by Dennis Ritchie." On the other hand, the preface to "The UNIX Programming Environment", by Kernighan and Pike, says "The UNIX operating system started on a cast-off DEC PDP-7 at Bell Laboratories in 1969....Ritchie, who helped move the system to the PDP-11 in 1970. Ritchie also designed and wrote a compiler for the C programming language." Meanwhile, S. R. Bourne (who's HE?) sez: "Thompson had also [in 1972] been working on the language B and the assembler for [Second Edition UNIX] was written in B. B was a direct descendant of BCPL, but programs were compiled in one pass to produce interpretive code. "Both B and BCPL were typeless languages, providing a single data object called the machine word making access to the PDP 11 byte handling instructions difficult. Types were therefore added to B to produce NB and an attempt to rewrite the system in NB was unsuccessful. Ritchie started work on a code generator for NB to make execution of programs faster. This language was called C although there were no structures or global variables. The language was sufficiently attractive, however, that new utilities were being written directly in C." Bourne also says "...although the first compiler was written for a PDP 11/45." and "The historical origins of C help explain some aspects of the language design. It was intended for systems programming and similarity to the machine was considered important. For example, the ++ operator has a direct equivalent in the PDP 11 instruction set. Features allowing portable programs to be written, such as unions, were added to the language in the late 1970s." Hope you paid attention; there'll be a quiz next period, and the first question will be "Who cares?"... -- -- bob,mon (bobmon@iuvax.cs.indiana.edu) -- "In this position, the skier is flying in a complete stall..."