The Immense Structure of Programming Languages

Posted by Gramarye on March 17, 2011, 2:02 p.m.

It was a long while ago, I think in a Blitz Basic book (How to Make Games!), that I first read about compilers. Probably most of you know, but a compiler takes a programming language and converts it (typically) to machine language, so that the computer can run it.

The book mentioned a curious thing about compilers. When you create a new compiled language, you must write the first compiler in another language that already has its own compiler, or you can't run it. Once you have that, you can write a new compiler in your own language, and then you're all set. So, the very first language other than machine code had to have its first compiler written in machine code.

I was daydreaming in assembly class, going over some really low-level computer stuff, when I thought of this again and expanded it. Every computer language ever written has to have descended from those first ML compilers. There probably weren't that many written, so all programming languages form an inverse pyramid, resting on those few initial works of genius from decades ago. It's a subtle difference from the fact that all programming languages eventually are executed in machine code.

This ties into my last thought on the matter – just think of all the layers of complexity that go into your computer. The internet as a whole, which goes all the way down to individual packets and electrical signals; your applications, which sit on the OS, all of which goes all the way down to the individual bits of ML, the structure of which was created in cooperation with the hardware, circuits and little bits of engineering. Imagine, at each of those levels, each of those incremental steps, were a bunch of programmers and engineers who put everything together and advanced the computer just one bit more, without any idea of the amazing things the next person would do in the next step.

tl;dr – (Since I just figured out what tl;dr means, I'll use it) – Any language you're writing in has ancestral 'genes' from the first few machine code compilers.

Comments

F1ak3r 13 years, 8 months ago

Quote:
Any language you're writing in has ancestral 'genes' from the first few machine code compilers.
Well I'd hope so. We wouldn't be so far along now if we stopped to reinvent the wheel every few years.

svf 13 years, 8 months ago

C++. Oh joy.

Astryl 13 years, 8 months ago

Where was C++ mentioned?

Anyways, because we programmers (Assemblers if you use assembly) are lazy by generalization, we're not going to go create an Assembler by hand-compiling opcodes, unless you're crazy. So yeah, we tend to hail that brave, stupid person who hand-created the first assembler, and keep using the existing bases, since it's easier that way.

svf 13 years, 8 months ago

Quote: Mega
Where was C++ mentioned?
It's a programming, language. If you didn't know. Lmk.

Astryl 13 years, 8 months ago

I know. Why bring it up in an apparently sarcastic manner when it wasn't mentioned?

svf 13 years, 8 months ago

It was more of "I use it". I guess I should have clarified that…

Astryl 13 years, 8 months ago

Ah, but I would have used:

Quote:

C++ Mortals. Fear it.

Nevermind then :P

svf 13 years, 8 months ago

Yeah.. What language do you use?

Astryl 13 years, 8 months ago

C++.

svf 13 years, 8 months ago

Gzgzgzgzgz