4 ms·
History of C and why it’s garbage (2015)
- Analemma_ 3y agoI've talked about this before, but if you want to be a serious, complete programmer, you need to read The Unix Hater's Handbook. You don't need to agree with it: you could disagree with every word and that's a legitimate, defensible position. But you do need to read it. The reason you need to read it is because there's this hacker mythos which has accumulated over the decades around C and Unix where they are perfect, infallible tools and everything that came after them is an inferior compromise in some way. And the entry of Microsoft just made it even worse, because once Wintel took over, if you criticized C/Unix you were "obviously" an enemy agent speaking in bad faith. Reading UHH can dispel this and give you some perspective that C and Unix are just tools, they "won" for many reasons which have nothing to do with their merits, and they suck for many of the same reasons that our other tools suck. You don't need to stop using them, but you should stop pedestalizing them.
- thesuperbigfrog 3y ago>> you need to read The Unix Hater's Handbook It's here: https://web.mit.edu/~simsong/www/ugh.pdf https://web.mit.edu/~simsong/www/ugh.pdf From the foreward: "If this book doesn’t kill Unix, nothing will." "As for me? I switched to the Mac. No more grep, no more piping, no more SED scripts. Just a simple, elegant life: 'Your application has unexpectedly quit due to error number –1. OK?'" "Donald A. Norman" === Little did he know when writing this in 1994 that the Mac would switch to a Unix operating system in 2001. "If you can't beat them, join them?"
- Eji1700 3y agoWell the old joke is that it was easier to make Unix user friendly than to make windows work.
- deleted 3y ago[deleted]
- kykeonaut 3y agoThank you for the book. I posted the article under a less inflammatory title, but it got changed to the actual pastebin title :c I appreciate C's use case, and the problems it is trying to solve. However, I find it interesting that the reason why C is still so widespread is partly due to a historical accident akin to what Javascript has been to the web.
- bobajeff 3y agoI wonder if, using something like RISC-V, it would be possible to create a modern system where all the components are controlled by the operating system instead of firmware. If so could assembly be the best systems language?
- simonblack 3y agoIf so could assembly be the best systems language? It is, but it's so non-portable. UNIX was a good compromise. By using C, you only needed to change the extremely low-level C stuff from one assembly-language to another. The rest of C and the operating system remains the same. That's why the Linux kernel is available for such a huge range of different CPUs.
- gregjor 3y agoBrian Kernighan tells a different story in his memoir and history of Unix. And he spelled Bjarne’s name correctly. Writing that Ritchie and Thompson didn’t credit Multics or CPL indicates the author didn’t get past the foreword of K&R.