<story><title>The original “Hello World”: B. W. Kernighan&apos;s intro to B (1973)</title><url>https://web.archive.org/web/20060225195733/http://cm.bell-labs.com/cm/cs/who/dmr/btut.html</url></story><parent_chain><item><author>I_Byte</author><text>I am currently in the process of learning C and having never seen any B code before I am rather surprised at their striking similarities. What could C do at the time that B couldn’t? Why did C eventually replace B?</text></item></parent_chain><comment><author>mettamage</author><text>You just caught me at a moment where I&amp;#x27;m reading Tanenbaum&amp;#x27;s book on Modern Operating Systems. Tanenbaum simplifies a lot of things, but here is his contribution [1]:&lt;p&gt;&amp;gt; The second development concerned the language in which UNIX was written. By now it was becoming painfully obvious that having to rewrite the entire system for each new machine was no fun at all [0], so Thompson decided to rewrite UNIX in a high-level language of his own design, called B. B was a simplified form of BCPL (which itself was a simplified form of CPL, which, like PL&amp;#x2F;I, never worked). Due to weaknesses in B, primarily lack of structures, this attempt was not successful. Ritchie then designed a successor to B, (naturally) called C, and wrote an excellent compiler for it. Working together, Thompson and Ritchie rewrote UNIX in C. C was the right language at the right time and has dominated system programming ever since.&lt;p&gt;Tanenbaum doesn&amp;#x27;t say it, but it almost seems like B and C were designed for creating UNIX. I wonder to what extent the authors of B and C were designing the languages for creating UNIX.&lt;p&gt;[0] In one of the previous paragraphs, Tanenbaum mentioned that the first version of UNIX was written in assembly.&lt;p&gt;[1] Modern Operating Systems (ed. 4, p. 715)</text></comment>
<story><title>The original “Hello World”: B. W. Kernighan&apos;s intro to B (1973)</title><url>https://web.archive.org/web/20060225195733/http://cm.bell-labs.com/cm/cs/who/dmr/btut.html</url></story><parent_chain><item><author>I_Byte</author><text>I am currently in the process of learning C and having never seen any B code before I am rather surprised at their striking similarities. What could C do at the time that B couldn’t? Why did C eventually replace B?</text></item></parent_chain><comment><author>gerdesj</author><text>You could start here: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;B_(programming_language)&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;B_(programming_language)&lt;/a&gt;&lt;p&gt;As always on HN there is a certain amount of ... discussion about some of the finer points, generally about typing.  I suspect that if you follow the refs in the WP article most of the usual bikeshedding here will resolve itself satisfactorily.&lt;p&gt;For me (50 year old bloke) I dimly recall C always being available &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;C_(programming_language)&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;en.wikipedia.org&amp;#x2F;wiki&amp;#x2F;C_(programming_language)&lt;/a&gt; - apparently 1972ish so I was 2 or 3 when C came out and replaced B which probably didn&amp;#x27;t do much ....&lt;p&gt;Oh look at this (wrt B): &amp;quot;However, it continues to see use on GCOS mainframes (as of 2014)&amp;quot;</text></comment>