TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

C is not a low-level language (2018)

14 pointsby pdubroy7 days ago

7 comments

efitz7 days ago
Yes it is. I’m unswayed by your arguments. You start out by defining a low level language, concede that C meets your definition, and then go on to argue that even so, it’s not a low level language.
评论 #43978012 未加载
andrewmcwatters7 days ago
&gt;&gt; &quot;A programming language is low level when its programs require attention to the irrelevant.&quot;<p>Wow, today I learned there are only low-level programming languages.
评论 #43977893 未加载
评论 #43984175 未加载
empw7 days ago
By many of these arguments assembly is also not a low-level language
评论 #43983197 未加载
mystified50167 days ago
The author apparently has never heard of microcontrollers, or in fact is aware that the 68000 is still in <i>widespread</i> use and in production to this day, nearly half a century later.<p>The author&#x27;s entire argument seems to be that modern x86 CPUs are completely and totally distinct from the simple processors of yore, and one <i>cannot</i> apply the same mental model to them. That&#x27;s fair, even if it&#x27;s not strictly true.<p>Then they take a logical leap to say that nobody can program bare metal x86 like a 68000, therefore C cannot be a low level language at all in any circumstances for any platform. Which is just obviously false?<p>On simple CPUs like modern RISCs and AVRs or indeed 68000s, C is just assembly with extra steps. We <i>still</i> program these CPUs the same way we have for decades. In this situation, C is as bare metal as it gets without writing assembly. In C, you&#x27;re still manipulating CPU registers, you still have to manage memory yourself, you&#x27;re still programming the machine itself with only the lightest of abstractions.<p>If the author wanted to claim that there is no such thing as a low level language on x86, that&#x27;s fine. I strongly disagree, but it&#x27;s a valid argument. Asserting that C is not a low level language is not a valid argument.<p>Is C a bad model for modern processors? Yes, <i>absolutely</i>. Does that reflect on C itself in any way? No, these are <i>two different things</i>. We absolutely do need a better model and language than C for modern systems, but C is still the same as it&#x27;s always been. It&#x27;s still a low level language because millions of developers still use it on simple non-pipelined CPUs every day. The existence of other types of processors doesn&#x27;t somehow change that fact.
variadix7 days ago
If it has inline assembly it’s low-level in my opinion. This feature (or at a minimum the ability to link against and interface with assembled objects) is _the_ requirement for all hardware-facing programming, since general purpose programming languages cannot represent all possible hardware minutiae within the language.
Const-me7 days ago
&gt; it is possible to make C code run quickly but only by spending thousands of person-years building a sufficiently smart compiler<p>Just because some of the C++ code I write heavily relies on ISA-specific SIMD intrinsics doesn’t replace the language with some other one, it’s remains to be C++. Compared to solving the general problem by making a sufficiently smart automatically vectorizing C compiler, learning SIMD intrinsics is way more manageable.<p>BTW, a few years ago I wrote an article about SSE 1-4 and AVX 1-2 ISA extensions, as exposed to C and C++ languages: <a href="http:&#x2F;&#x2F;const.me&#x2F;articles&#x2F;simd&#x2F;simd.pdf" rel="nofollow">http:&#x2F;&#x2F;const.me&#x2F;articles&#x2F;simd&#x2F;simd.pdf</a>
OSDeveloper7 days ago
I would say it is only a low level language if it&#x27;s a form of assembly or used in systems programming like Linux or OpenBSD or whatever else in the kernel land
评论 #43976873 未加载