4 ms·
The discussion usually boils down to a. We need a better C b. We need better programmers. Personally I believe C tries to hard to be high level instead of wh
by fithisux 11y ago
The discussion usually boils down to
a. We need a better C
b. We need better programmers.
Personally I believe C tries to hard to be high level instead of what it really is. Newer revisions should try to make it lower level. For example I never could understand why we need enums. Enums are very useful for Java or Golang which are high-level. C never needs enums.
Why should I ever put const in the argument of a function? It makes sense for D but for C no. Why should I ever use complex in C. Is there any HW that supports complex numbers? If it becomes standardized, then why not?
C should be good to write kernels and simple utilities and simple compilers. For the rest, use a high-level language.
- pjmlp 11y agoThe thing is, such higher level systems programming languages were already a thing in the 60's. C designers just wanted to hack something for their toy OS and here we are.
- woodman 11y ago> For example I never could understand why we need enums. > Why should I ever put const in the argument of a function? Reducing potential state and conveying programmer intent. Both lead to safer and more performant code (by way of compiler optimizations).
- fithisux 11y agoWhat you say is incompatible with the "Cross-platform assemble", simple language ideals. If that was the intent why not throw namespaces and other goodies in?
- woodman 11y agoWell those ideals are pretty subjective, I'd say that the ideal language would be flexible, performant, safe and productive. As those goals conflict with one another, the ideal language would find the perfect balance. I don't know if C has found that balance, but it has had a pretty good run. Defining sets (enums) and memory access constraints (consts). I wouldn't describe that as high level from a conceptual or practical perspective. Namespaces are simple conceptually but not in practice. The same can be said about the beautiful logical consistency of S-expressions.
- kjs3 11y agoWe've had "better C" since the 70s (since 68 depending on your view of Algol68). Programmers didn't want to use them. I can't tell you how many times I heard "having to to type BEGIN and END sucks" as though that was a valid argument against a language that had none of the issues C has.