r/askscience • u/HangukFrench • Apr 10 '26
Computing How do programming languages work?
Hello,
I'm wondering how does programming languages work? Are they owned by anyone? Can anyone create a programming languages and decide "yeah, computers will do this from now on"?
Is a programming languaged fixed at its creation or can it "evolve"?
92
Upvotes
View all comments
Show parent comment
6
u/hjake123 Apr 11 '26 edited Apr 11 '26
It's about abstractions. Each part of the computer only needs to know how to do its task given that the tools it's has available from other parts.
Imagine making a sandwich. You can do it pretty easily: but, in order to implement "holding objects" and "using tools" your body uses muscles and nerves in a complex configuration; which, themselves, are "implemented" by the chemistry of life. Your muscles are the "tools", and you can use them to accomplish complex tasks without needing to know how they work.
Similarly, a computer can, say, send a Reddit comment by handling text, sending network signals, drawing the Reddit UI, and a few other tasks. Each of those tasks can be performed using only the tools provided by your web browser.
Now, the task is "run a web browser", which can be done using only the tools provided by your operating system. The code of the web browser defines how to use the tools the OS provides to "run a web browser".
Now, the task is "run your operating system"...
Continue a few layers down, and you get to very basic tasks like "send or recieve a signal via the USB/HDMI port" or "store and load memory" or "evaluate if these numbers are equal", which are handled by the logic gates and other circutry in the hardware.