5 ms·
How many programs running on your computer were written in these languages?
by tosseraccount 11y ago
How many programs running on your computer were written in these languages?
- pjmlp 11y agoWhat does it matter?!? UNIX killed those languages.
- AnimalMuppet 11y agoAnd why? Because in practice, C on Unix was better for writing actual programs that actually worked to do things that people cared about. And that's why it matters: Because C was actually better in practice. Everybody seems to be in denial about that; maybe they should learn to deal with it. Was that "actually better" due to C, or to Unix? Well, maybe some of both, but Unix was written in C, so C was useful for writing the operating system that you blame for C taking over the world... If you don't understand why C was better in practice, you're going to fail in attempts to create something better, and never know why. You're just going to be ignored, while you whine about how your way was better.
- pjmlp 11y agoCompletely wrong! Back in those days we used to pay for our compilers, usually in values of thousands, remember those? Only languages delivered as part of was then the OS vendor's tooling got used at most work locations. It always required lots of persuasion to buy compilers for languages not delivered as a standard part of the OS. So as UNIX managed to gain a foothold into the enterprise and universities, pushing mainframes and other OSes, C gained mind-share. UNIX took over the world by accident, by having AT&T initially providing the code for free (which they repented later on) to universities, which happened to have persons like Bill Joy and Scott McNealy that got successful with their startups using the OS they enjoyed at their universities. Had AT&T never given the code for free or those startups floundered, UNIX will be another footnote alongside MULTICS and friends. Just like nowadays no one sane would use JavaScript, if the browsers had first class support for other programming languages.
- AnimalMuppet 11y agoThere is an element of truth in what you say. You seem to think it's the whole story; I do not. Had C not been good in practice, "free" wouldn't have been enough. Those OSes written in other system programming languages: Why didn't their computers take over the world? I mean, sure, AT&T was pumping money into Unix, but other companies were pumping money into the competition. Why did Unix win? It's not just because of evil AT&T. It's because Unix could deliver working features, and others struggled to keep up. Why could Unix deliver working features? Yes, partly because of AT&T's money. But partly because C turned out to be really useful as a systems programming language. These other languages you mentioned a few posts ago: Sure, they looked good on paper, only where's the beef? When it came time to deliver, what was written in them? More functionality was written in C, which is why Unix won. I'll repeat my previous statement: If you don't understand why C was better in practice, you're going to fail in attempts to create something better, and never know why. You're just going to be ignored, while you whine about how your way was better. History ignored your "better" languages. The world moved on from them, for good reasons. You think they were better, but in real life, they weren't.
- pcwalton 11y agoWhat can you do in C that you can't do in, say, Algol 68? Or even Pascal (once you get to a recent enough version supporting dynamic arrays/first-class pointers)? I think the situation is not far off from what pjmlp is saying: there were several more or less equally good languages available at the time, and C won by virtue of being in the right place at the right time. There are lots of really nice things about C from a systems point of view, but most languages of the 70s had those too. C was a nice language for the late 70s (not so much today, IMO), but not hugely nicer than its contemporaries.
- AnimalMuppet 11y agoYou can do it in those languages (at least you can in a modern Pascal; I don't know enough about Algol to say). But remember, the original claim by pjmlp was "It is a big flaw to ignore what other language communities were doing. Other systems programming languages older than C did it properly." That doesn't apply to the Pascal you speak of, because at the time C arose, Pascal wasn't "once you get to a recent enough version supporting dynamic arrays/first-class pointers". It was Pascal with the size of an array being part of the type of an array. That's type safety, sure. But it also means (to use an example that I have personal experience with), if you're writing a numerical simulation on a 2D array, and you want to let the user specify how big the mesh is, and then allocate memory to hold the mesh, you have a problem. You can't define a variable-sized array at all in the Pascal of the time. Now try to think about how you'd write a memory allocator in that. Good luck. Another example: We were on an embedded system. To write to hardware registers, we had to call an assembly-language subroutine. In C, we would have simply used a pointer to an absolute memory address. This is what C gave you - you could just do things without the language getting in the way. Yes, you could cut yourself on C's sharp edges, whereas Pascal protected you. But when you needed the sharp edges to cut something, Pascal didn't have them, and you were stuck. Again, I don't know enough about Algol to meaningfully compare it to C. The Pascal of the day wasn't the answer, though.
- emodendroket 11y agoWell, by this metric, (insert Java, bat files, JavaScript, whatever thing you hate here) is a fantastic language too.