r/programming • • May 01 '18

C Is Not a Low-level Language - ACM Queue

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

303 comments sorted by

View all comments

Show parent comments

5

u/ThirdEncounter May 01 '18

The thing is, as a programmer you have no control over how those CPU tasks are done - except, of course, if there is a bug that leads to Spectre and others. So, what does it matter if assembler does not account for such tasks?

That's like saying that you're not a true expert car driver because you can't access the steering hydraulic pump with your bare hands to control it.

7

u/Garestinian May 01 '18

But I think that's precisely the point of the article - modern "fast" processors are so complex that even plain old assembly isn't low level in the truest sense. So a question is - could we do with simpler (dumber) processors, and assembly that is closer to how processors work today (multithreading, vectorisation, cache), but is not supportive of C?

3

u/MINIMAN10001 May 01 '18

Well the reason why we've reached this point is because it irritatingly went down the rabbit hole of saying "Well X isn't low level because Y"

Truth is the answer is no, C as a language is close enough to the code ran on the hardware and does not try to abstract away a large amount it does qualify as low level.

1

u/pdp10 May 01 '18

In theory, you can load microcode into most types of hardware to control lower-level behavior, and even make your own instructions. In practice, the hardware vendors don't allow end-users or even OEMs to do that any more.