12

An intresting talk on Is Everything a File, IO Models, Is C a Low Level Language, and a quick comparison on Interfacing with USB devices on Mac OS, Linux and Windows.

you are viewing a single comment's thread
view the rest of the comments
[-] avidya@programming.dev 2 points 3 days ago

If I am not mistaken, the argument made by papers like "C is not a low level language" is that C used to be a low level language, because it fit the architecture of a PDP, but a modern computer isn't a PDP, and so C isn't low level.

[-] Scoopta@programming.dev 1 points 2 days ago

I've honestly not heard that particular argument for why C isn't low level. I'm not even sure I see what design choices they made which are PDP specific. C seems to fit pretty well on top of computer architecture as a whole. As long as you're turing complete, have RAM, and the ability to issue function calls you basically have everything you need for C. The main reason I'm familiar with for why it's high level is because it's ISA independent. C comes from a time where most software was written in assembly and so highly CPU specific. C isn't that, you write C for one platform and it works everywhere, just need a recompile (provided all the APIs you use are available)

[-] Quibblekrust@thelemmy.club 1 points 1 day ago* (last edited 1 day ago)

DisclaimerDear commenters, I have done very little research on this topic, and I am not a computer scientist. Just an average programmer who has written at most a few hundred lines of C. Feel free to (politely) tell me all the ways I am wrong.

As long as you're turing complete

I think you can stop there. Any computable function can be run on any Turing complete machine. You just need the right machine code. So you don't really need to add further qualifications.

However, if you do... If you say C needs to be able to read input, write to files and devices, allocate and randomly access memory, or talk to an operating system in any way, then you've tied it to a particular (abstract) architecture. So, I'd say that's a pretty low level language on the abstraction spectrum. Most other languages are higher than it. If you were to rate programming languages from 0 to 10, C would be about a 3. Maybe even 2 for kernel code. Python would be like a 7, and SQL would be like an 8.

Anyone saying a language is strictly either "high" or "low" is missing a lot of nuance, and C is definitely on the low end.

[-] Scoopta@programming.dev 1 points 5 hours ago

Yes, you CAN stop there, the other qualifiers I added were specifically because C sort of assumes those to be present and while there are C to bf compilers they emulate that functionality on top of the more restrictive, but turing complete, architecture. I was listing the things C assumes/requires the hardware to be able to do for reasonable performance and compilers not emulating features.

These are not language features but features of the C standard library and are only required if you wish to use said library, they have little to do with hardware requirements or the language itself

You aren't wrong but classically a high level language is one that is abstracted from the hardware which is precisely why C is considered high level. You don't have to think about registers, instructions, stacks, etc, you just call functions with arguments and write "high level" code. It's on the lower end compared to modern very high level languages but it's still considered high level. Classically most non-assembly languages are.

this post was submitted on 15 May 2026
12 points (100.0% liked)

Linux

13701 readers
522 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS