Newsgroups: comp.arch Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: C machine Message-ID: <1987Dec15.200736.11726@utzoo.uucp> Keywords: C, Lilith (sp?), In Progress? Organization: U of Toronto Zoology References: <759@auscso.UUCP>, <4405@watdragon.waterloo.edu> Date: Tue, 15-Dec-87 20:07:28 EST > I have always thought of C as a language designed to be optimal on the > PDP/11. The ++ and -- operators were designed to take advantage of the > PDP/11's autoincrement and autodecrement features... Sorry, not so. Admittedly this one fooled me too, but Dennis set me straight: ++ and -- existed even in B, back on the PDP7. Support for such operations has been common in DEC hardware since long before the 11, and some did exist on the 7, which may have influenced the design a bit. > C also uses null > terminated strings, which is OK for the PDP/11, but not especially > efficient for machines with block move instructions. It depends on what kind of block-move instructions you have. And one can argue that NUL-terminated strings are perhaps the right decision regardless. Few programs have their running times dominated by string copying, after all, and NUL termination is convenient in various small ways. -- Those who do not understand Unix are | Henry Spencer @ U of Toronto Zoology condemned to reinvent it, poorly. | {allegra,ihnp4,decvax,utai}!utzoo!henry