<story><title>C Is Not a Low-level Language (2018)</title><url>https://queue.acm.org/detail.cfm?id=3212479</url></story><parent_chain><item><author>joe_the_user</author><text>Something about this constantly appearing trope bugs me.&lt;p&gt;I began programming C and assembler on the VAX and the original PC. At that time, C was a reasonable approximation of the assembly code level. We didn&amp;#x27;t get into expanding C to assembly that much but the translation was reasonably clear.&lt;p&gt;As far as I know, what&amp;#x27;s changed that mid-80s world and now is that a number of levels below ordinary assembler have been added. These naturally are somewhat confusing &lt;i&gt;but&lt;/i&gt; they aim to emulate the C&amp;#x2F;assembler model that existed way back then. These levels involve memory protection, task switching, caches and all things involved with having the current zillion-element Intel CPU behave approximately like the 16-register CPU of yore but much-much faster.&lt;p&gt;I get the &amp;quot;there&amp;#x27;s more on heaven and earth than your flat memory model, Horatio&amp;quot; (apologies to Shakespeare).&lt;p&gt;BUT, I still don&amp;#x27;t see any of that making these &amp;quot;Your Ceeee ain&amp;#x27;t low-level no more sucker&amp;quot; headlines enlightening. A clearer way to say it would &amp;quot;now the plumbing is much more complicated and even c programmers have to think about it&amp;quot;.&lt;p&gt;Because... adding levels below C and conventional assembler still leaves C exactly as many levels below &amp;quot;high level&amp;quot; language as it was before and if there&amp;#x27;s a &amp;quot;true low level language&amp;quot; for today I&amp;#x27;d like to hear about it. And the same sorts of programmers use C as when it was a low level language and the declaration doesn&amp;#x27;t even give any context, doesn&amp;#x27;t even bother to say &amp;quot;anymore&amp;quot; and yeah, I&amp;#x27;m sick of it.&lt;p&gt;Edit: plus this particular actual article is primarily a rant about processor design with C just pulled into the fight as a stand-in for how people normally program and modern processors treat that.</text></item></parent_chain><comment><author>lmm</author><text>&amp;gt; Because... adding levels below C and conventional assembler still leaves C exactly as many levels below &amp;quot;high level&amp;quot; language as it was before and if there&amp;#x27;s a &amp;quot;true low level language&amp;quot; for today I&amp;#x27;d like to hear about it. And the same sorts of programmers use C as when it was a low level language and the declaration doesn&amp;#x27;t even give any context, doesn&amp;#x27;t even bother to say &amp;quot;anymore&amp;quot; and yeah, I&amp;#x27;m sick of it.&lt;p&gt;Not really. For many purposes, C is not any more low-level than a supposedly &amp;quot;higher level&amp;quot; language. 20 years ago one could argue that it made sense to choose C over Java for high-performance code because C exposed the low-level performance characteristics that you cared about. More concretely, you could be confident that a small change to C code would not result in a program with radically different performance characteristics, in a way that you couldn&amp;#x27;t be for Java. Today that&amp;#x27;s not true: when writing high-performance C code you have to be very aware of, say, cache line aliasing, or whether a given piece of code is vectorisable, even though these things are completely invisible in your code and a seemingly insignificant change can make all the difference. So to a large extent writing high-performance C code today is the same kind of programming experience (heavily dependent on empirical profiling, actively counterintuitive in a lot of areas) as writing high-performance Java, and choosing to write a program with extreme performance requirements in C rather than Java because it&amp;#x27;s easier to control performance in C is likely to be the wrong tradeoff.</text></comment>
<story><title>C Is Not a Low-level Language (2018)</title><url>https://queue.acm.org/detail.cfm?id=3212479</url></story><parent_chain><item><author>joe_the_user</author><text>Something about this constantly appearing trope bugs me.&lt;p&gt;I began programming C and assembler on the VAX and the original PC. At that time, C was a reasonable approximation of the assembly code level. We didn&amp;#x27;t get into expanding C to assembly that much but the translation was reasonably clear.&lt;p&gt;As far as I know, what&amp;#x27;s changed that mid-80s world and now is that a number of levels below ordinary assembler have been added. These naturally are somewhat confusing &lt;i&gt;but&lt;/i&gt; they aim to emulate the C&amp;#x2F;assembler model that existed way back then. These levels involve memory protection, task switching, caches and all things involved with having the current zillion-element Intel CPU behave approximately like the 16-register CPU of yore but much-much faster.&lt;p&gt;I get the &amp;quot;there&amp;#x27;s more on heaven and earth than your flat memory model, Horatio&amp;quot; (apologies to Shakespeare).&lt;p&gt;BUT, I still don&amp;#x27;t see any of that making these &amp;quot;Your Ceeee ain&amp;#x27;t low-level no more sucker&amp;quot; headlines enlightening. A clearer way to say it would &amp;quot;now the plumbing is much more complicated and even c programmers have to think about it&amp;quot;.&lt;p&gt;Because... adding levels below C and conventional assembler still leaves C exactly as many levels below &amp;quot;high level&amp;quot; language as it was before and if there&amp;#x27;s a &amp;quot;true low level language&amp;quot; for today I&amp;#x27;d like to hear about it. And the same sorts of programmers use C as when it was a low level language and the declaration doesn&amp;#x27;t even give any context, doesn&amp;#x27;t even bother to say &amp;quot;anymore&amp;quot; and yeah, I&amp;#x27;m sick of it.&lt;p&gt;Edit: plus this particular actual article is primarily a rant about processor design with C just pulled into the fight as a stand-in for how people normally program and modern processors treat that.</text></item></parent_chain><comment><author>snaky</author><text>&amp;gt; if there&amp;#x27;s a &amp;quot;true low level language&amp;quot; for today I&amp;#x27;d like to hear about it&lt;p&gt;&amp;quot;Steel Bank Common Lisp: because sometimes C abstracts away too much&amp;quot; &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;www.pvk.ca&amp;#x2F;Blog&amp;#x2F;2014&amp;#x2F;03&amp;#x2F;15&amp;#x2F;sbcl-the-ultimate-assembly-code-breadboard&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;www.pvk.ca&amp;#x2F;Blog&amp;#x2F;2014&amp;#x2F;03&amp;#x2F;15&amp;#x2F;sbcl-the-ultimate-assembl...&lt;/a&gt;&lt;p&gt;ATS - C plus everything you could get from modern types, including type-safe pointer arithmetics &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;www.youtube.com&amp;#x2F;watch?v=zt0OQb1DBko&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;www.youtube.com&amp;#x2F;watch?v=zt0OQb1DBko&lt;/a&gt;&lt;p&gt;Compiling Haskell to hardware &lt;a href=&quot;http:&amp;#x2F;&amp;#x2F;conal.net&amp;#x2F;blog&amp;#x2F;posts&amp;#x2F;haskell-to-hardware-via-cccs&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;conal.net&amp;#x2F;blog&amp;#x2F;posts&amp;#x2F;haskell-to-hardware-via-cccs&lt;/a&gt;</text></comment>