News for hackers. Stuff that matters.
Re:A critique of "How to C in 2016" by fithisux on Friday January 15, 2016 @08:20AM (#10909093)
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.

Re:A critique of "How to C in 2016" by woodman on Friday January 15, 2016 @10:27AM (#10909803)
> 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).

Re:A critique of "How to C in 2016" by fithisux on Friday January 15, 2016 @02:34PM (#10911528)
What 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?

Re:A critique of "How to C in 2016" by woodman on Friday January 15, 2016 @06:29PM (#10913097)
Well 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.

Re:A critique of "How to C in 2016" by pjmlp on Friday January 15, 2016 @09:30AM (#10909479)
The 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.