Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Makes me wonder how hard the programming languages that C defeated must have sucked.


BCPL barely had types. Everything was an "int" and you stored pointers, addresses, floats and so on in that same type (no concept of sizeof(int) != sizeof(void*) in those days!)

Edit: nice intro to BCPL. It's much worse than I thought: http://www.davros.org/c/bcpl.html


rwmj mentioned BCPL, but most of the languages C defeated lost by virtue of being too high-level, not too low-level. Pascal was probably the best of the lot, and "Why Pascal is not my favorite programming language" is an excellent contemporary explanation of the issues with it, none of which apply to modern Pascal dialects, but many of which apply to Fortran and PL/1, the mainstream high-level languages of the time.

On microcomputers, high-level languages in general were not viable. They were too inefficient. Jonathan Sachs wrote the first version of Lotus 1-2-3 in 8088 assembly, the same language as the operating system it ran on. Later versions of both were written largely in C. It was competing with VisiCalc, which was originally written in 8080 assembly and, as I understand it, sort of cross-compiled to the 8088 — thus failing to take advantage of many optimization advantages.

Really, though, programming languages don't win broad adoption by sucking less, except very indirectly. You rarely choose the programming language you're going to learn next according to its aesthetic merits. You usually choose it because you're working on a system that's written in it, that can most easily be called from it, or that has good support for it as a development language. You're not going to write an AJAX app in C++, but in JavaScript, or maybe CoffeeScript, because debugging and performance improvement would be a nightmare if you use the LLVM JavaScript backend. You're not going to build a search engine on Lucene using Lua, no matter how much you love Lua, because you'll spend all your time on getting Lua to talk to Java. (I don't know, maybe with GCJ this is practical? I'm not going to find out.)

And, although I wasn't there at the time, I think people adopted C in the 1980s not because they rationally weighed its advantages and disadvantages relative to PL/1, Pascal, Forth, and Bliss, but because the only internet-connectable machine their university department could afford was running BSD Unix, and if you wanted to write software for it, especially if you wanted to modify any of the large volume of software that already existed, you'd damned well better write it in C. So you learned C. And then a lot of the first-class programmers who cut their teeth on Unix moved on to the microcomputer world, where different incompatible versions of Pascal were vying with different incompatible assembly languages, and they brought C with them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: