11 votes

ACM Queue: C Is Not a Low-level Language

2 comments

  1. hereticalgorithm
    (edited )
    Link
    There's a fundamental question implied here: what do we do when abstraction goes wrong? Abstractions are a necessary trade-off because a programmer must necessarily interact with other (lower...

    There's a fundamental question implied here: what do we do when abstraction goes wrong?

    Abstractions are a necessary trade-off because a programmer must necessarily interact with other (lower level or external) systems, yet it is impossible for a single person to retain all the details simultaneously. Thus they must aim to retain what is essential about the components being reasoned with (for instance, that this program resides in a finite amount of RAM), while discarding what is irrelevant to the coder (the exact voltage, refresh rate, etc of the RAM storing this program).

    In this case, C's abstraction layer is misleading because it's model discards details that most programmers (working with C) would want to be exposed. Kinda like if you abstracted a credit card as "oh yeah you can buy stuff and pay them back later", without saying anything about interest.

    2 votes
  2. meghan
    Link
    WHAT?! The reasoning for this is explained just after but I thought this fact was particularly mind blowing.

    The quest for high ILP was the direct cause of Spectre and Meltdown. A modern Intel processor has up to 180 instructions in flight at a time...

    WHAT?! The reasoning for this is explained just after but I thought this fact was particularly mind blowing.

    1 vote