r/programming • • Aug 13 '18

C Is Not a Low-level Language

https://queue.acm.org/detail.cfm?id=3212479
87 Upvotes

222 comments sorted by

View all comments

Show parent comments

5

u/[deleted] Aug 13 '18

His argument is maybe we should have a parallel-first low-level language like Erlang, etc. rather than C.

But in the real world we can't just port decades of C programs, so we're stuck with these little optimisations, same as being stuck with x86.

10

u/[deleted] Aug 13 '18

[removed] — view removed comment

-4

u/Ameisen Aug 13 '18

Technically, so can C++. Just need to relax the spec a bit and improve compiler analysis.

4

u/[deleted] Aug 14 '18

[removed] — view removed comment

-3

u/Ameisen Aug 14 '18

You usually don't specify the algorithm in modern C++, either. You are more telling it what you want.

5

u/yiliu Aug 13 '18

same as being stuck with x86.

Between RISC chips for mobile devices and laptops and GPUs, we're less 'stuck' on x86 than any time is the last 20 years, though. It's definitely hard to move beyond decades of legacy code, but it doesn't hurt to think about the pros & cons of the situation we find ourselves in and brainstorm for alternatives.

1

u/[deleted] Aug 13 '18

But in the real world we can't just port decades of C programs, so we're stuck with these little optimisations, same as being stuck with x86.

How do you think those decades of C programs got written to begin with? They weren't created out of this air. Most of them were copies of older programs that came before. I bet at the time C was created there were people saying the exact same thing you are now.

1

u/m50d Aug 14 '18

When C was created they wrote a whole new OS in it (Unix) that no existing programs worked on. You couldn't get away with doing that today.