4 ms·
> The linked article is arguing that C isn't low level because modern CPUs behave so differently than what their hardware interface suggests they do. Which is
by dragonwriter 7y ago
> The linked article is arguing that C isn't low level because modern CPUs behave so differently than what their hardware interface suggests they do.
Which is right in conclusion, but wrong on reasoning.
C isn't low level because it allows, by design, allows writing code that works on very different hardware interfaces by abstracting away from what the particular machine is does independently of whether or not the CPU behaves the way it's interface suggests. This is why decades ago C was a textbook example of an HLL and nothing relevant to that description has changed in the intervening period.
> It is useful to distinguish between C and Python in terms of C is low level and Python is high level.
Python is in the general class of languages for which the term very high level programming language was created, and, yes, it's useful to distinguish between Python and C (hence the term coined for that purpose), but it's also useful to distinguish between Assembly and C (hence the terms coined for that purpose.)
- a1369209993 7y ago> allows writing code that works on very different hardware interfaces by abstracting away from what the particular machine is does Looks at a 8/16bit in-order processor with synchronous, byte-at-a-time memory access and perhaps 1Kbit of on-chip registers total. Looks at a 64bit, out-of-order, speculative, multicore behemoth with 64(or 72)bit data bus accessed by a embarassingly complicated asynchronous protocol, and cached in multiple MB of on-die RAM, as well as dozens of general purpose registers and hundreds if not thousands of special-purpose or model-specific registers. Looks at QEMU and other x86 interpreters. So what you're saying is that x86 assembly is a very bad high-level language?