4 ms·
C is so old I wouldn't be surprised if harping on it was considered passé by the time Visual Basic was released. Language "elitists" don't comment on C often be
by SubjectToChange 6y ago
C is so old I wouldn't be surprised if harping on it was considered passé by the time Visual Basic was released. Language "elitists" don't comment on C often because everyone knows that it's a terribly designed language. And anyone who actually says C is elegant, or downplays its flaws, is often too deluded or spiteful to be convinced otherwise.
The problem with C is that after so many years of use, many of developers don't have a choice. C is essentially COBOL but with orders of magnitude more code in use. So you can complain about how legitimately horrendous the language is, but it doesn't change anything.
- young_unixer 6y agoC is a bad language, but it's still less bad than all the others a reasonable person would use to write an OS (so functional languages don't apply).
- SubjectToChange 6y agoNo, I wouldn't say C is the least terrible option. Languages like Ada/SPARK, C++, D, Rust, and Zig all outclass C in terms of safety and usability without sacrificing performance. And although ATS has many sharp edges, it demonstrates how a functional language can have the exact same profile as a C program. I think it would be a profound mistake to write a new OS in C. The safety issues are reason enough to abandon the language.
- young_unixer 6y agoFrom a language design perspective, C++ is worse than C. From a practical perspective, C++ can be better than C if the programmers are good and define a sane subset of the language to use. D has garbage collection by default. I know it can be disabled, but when 80% of people use the default, using anything else means means you're a second class citizen. Ada/SPARK I haven't looked enough into, mainly because Ada's extremely verbose syntax puts me off, and I guess most system programmers have a similar opinion. Rust and Zig have big potential to become good languages, but they're too immature right now (no standard, only 1 viable implementation, etc). Maybe in 10 years using Zig to write an OS will be a no brainer, but not yet.