3 ms·
> The whole point of C is that you know exactly what's going on and it's relatively clear in the code itself. Given the widespread undefined behavior and the w
by munificent 1y ago
> The whole point of C is that you know exactly what's going on and it's relatively clear in the code itself.
Given the widespread undefined behavior and the ways that compilers aggressively rely on that to reorganize and optimize your code, that hasn't been the case for many many years.
Sure, if you're using dmr's compiler on a PDP-11, then C is a pretty transparent layer over assembly, which is itself a fairly thin layer over the CPU. But today, C is an ambiguous high level communication language for a highly optimizing compiler which in turn produces output consumed by deep pipeline CPUs that freely reschedule the generated instructions.
- tgv 1y agoRescheduling instructions is not relevant, is it? Are there architectures which change the semantics of the instructions by changing execution order?
- munificent 1y ago> Rescheduling instructions is not relevant, is it? I guess it probably depends on why a user might want to think of C as low level. The user visible semantics shouldn't change, I hope, but the performance might.