4 ms·
Very good article. There is a huge cultural blindfold that Unix/C have formed indirectly formed on everybody's thinking about computers. Most of us have never
by zurn 15y ago
Very good article.
There is a huge cultural blindfold that Unix/C have formed indirectly formed on everybody's thinking about computers. Most of us have never used computers outside the Unix sphere of influence.
The point about hardware (in this case instruction set) adapting to Unix/C strings is also a recurring pattern,
and makes it hader to climb out of the pit of local optimum /path dependence.
Fun thought experiment to think how things might have
turned out if ideas from Burroughs mainframes, Transputer, Lisp machines or Intel i432 type of things had taken off.
But Unix was easy to port because of simplicity, kinda-open-source for universities, etc. even though those properties soon disappeared after it became popular. And we know the rest.
- wladimir 15y agoUnix is not all-terrible though. It also has quite a few very sane ideas such as combining simple commands into pipelines and "everything is a file descriptor". I do agree that zero-terminated strings are the worst idea ever. It's almost impossible to use them in a secure and performant way (at the least it requires a lot of extra thinking). Alternative string libraries such as bstring make string handling in C sane, but unfortunately the default C strings mean a lot of people still use char* and str(l)cpy/str(l)cat/strlen/... The worst thing is that many are religiously convinced that it is a good idea just because it's the UNIX and C way (TM). It's so deeply ingrained.
- epo 15y agoActually most have never knowingly used computers outside the Windows sphere of influence but we shall let that pass. Unix was a massive breath of fresh air at the time, it became popular and widespread because it was so much better (and more accessible/cheaper) than commercial operating systems of the time. The cultural bindfold you refer to is because there has been no comparable revolution in operating systems design since Unix, people tinker (comparatively) at the edges because Unix got so much right. NUL terminated strings is a minor aspect of library design. Yes with hindsight if things had been done differently then things might now be different, but like the QWERTY keyboard once decisions get out in the world they become too difficult to reverse.
- arethuza 15y ago"Fun thought experiment to think how things might have turned out if ideas from Burroughs mainframes" Have you ever used a Burroughs mainframe? They did have a rather wonderful architecture but the interactive user experience from CANDE left a lot to be desired.
- daeken 15y agoI don't think anyone is saying that we should go back to Burroughs mainframes, or anything else from the past for that matter. But we should definitely draw more inspiration from them.
- arethuza 15y agoSorry, bit of a knee jerk reaction there, clearly the eldritch horror that was Burrough's idea of an interactive user environment left me with some mental scars. However, one positive thing about briefly using CANDE was that it made me REALLY appreciate Unix when we eventually moved to using it.
- wglb 15y agoLike the idea of virtual memory?
- gaius 15y agoYes; it's next to impossible to buy a processor now that isn't really a "C-machine", just as Symbolics made "Lisp machines" (or Chuck Moore will sell you a "Forth machine" with hardware designed to efficiently deal with stacks). The concept that processors really aren't language-agnostic (i.e. they actually do care whence originated the machine code) needs more publicity.