7 ms·
It's not a flaw IMO, it's just confusing. Especially for those who come from higher languages and don't read a solid intro into C. It's actually explained quite
by kachnuv_ocasek 11y ago
It's not a flaw IMO, it's just confusing. Especially for those who come from higher languages and don't read a solid intro into C. It's actually explained quite well in K&R.
- Animats 11y agoNo, it's a design flaw. It's a consequence of K&R C for the PDP-11, which had to be crammed into a small address space machine and didn't even have function prototypes. In K&R C, which is one notch above assembly code, there was no cross-module type checking and everything was really an int or a float. Even in the 1970s, this was kind of lame. Pascal could pass array sizes through a call.
- pjmlp 11y agoIt is a big flaw to ignore what other language communities were doing. Other systems programming languages older than C did it properly.
- tosseraccount 11y agoHow 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.
- 11y ago
- emodendroket 11y agoWell, by this metric, (insert Java, bat files, JavaScript, whatever thing you hate here) is a fantastic language too.
- pcwalton 11y ago> It's not a flaw IMO, it's just confusing. That is a flaw.