Educate me!

Can someone provide some insight to The argument "eventually assembly level programmers will be replaced with compilers"

I am supposed to write a rather short essay defending my position as to whether the above statement is true or not, but after hours and hours of considering my opinion, I still sit here confused with the original statement. Why would assembly level programmers be replaced by a compiler? I thought assembly language was a low level programming language, and a compiler was what we used to translate that low level language to a higher level language such as C. How can something used to bridge the machine language to the programming language, replace the machine language? Or am I lookin at this wrong...
assembly language was a low level programming language, and a compiler was what we used to translate that low level language to a higher level language such as C

It is the other way around the compiler translate high level languages into low level languages. And thus when someone says "eventually assembly level programmers will be replaced with compilers" it, in my opinion, is false. A human expert will almost always produce more optimized code than a compiler. The only time, I believe, this will change is when P is proved equal to NP.
but cant compilers be automatically generated? If so, wouldn't that mean that we don't necessarily need to "program" anything on that lower level?
What happens when a new hardware platform comes out? What happens when someone decides to make a new OS? What happens when you need optimizations to your C code that your compiler can't perform?

There will always be a need of assembly level programmers. It's just the extent of that need that may change.
What happens when a new hardware platform comes out? What happens when someone decides to make a new OS? What happens when you need optimizations to your C code that your compiler can't perform?

There will always be a need of assembly level programmers. It's just the extent of that need that may change.


There will always be a need for assembly level programmers, if only to help write the software that replaces assembly level programmers.

But is there any kind of optimization that could not theoretically be done by a compiler?
when P is proved equal to NP

Or when P is proved to not equal NP. And I hope to god they're proven to not be equal.
"eventually assembly level programmers will be replaced with compilers"


I write in C++ and the assembly is produced by a compiler. I don't have some guy who reads me code and turns it into assembly. The guy who would do that was replaced before he even got there :p
Script Coder wrote:
A human expert will almost always produce more optimized code than a compiler.
I think you have that backwards, a compiler will almost always generate more optimized code.
But is there any kind of optimization that could not theoretically be done by a compiler?
The problem of making a compiler capable of doing all the kinds of possible optimizations an ideal human could is AI-hard.
A human expert will almost always produce more optimized code than a compiler.


That might be true in some instances, but generally optimized assembly is completely unintelligible and very hard for humans to handle, while machines are pretty good (and getting better) at it. Except for writing compilers themselves, there usually is no reason to touch assembly nowadays.
This is well worth a read: http://www.agner.org/optimize/

He has some really neat assembly optimisations.

Anyway, back on topic.

but cant compilers be automatically generated?

Short answer, no. When a chip manufacturer churns out a new chip with new instruction sets and different registers and all that, someone has to read the manual and write the new compiler. Any existing programs that were made before that new instruction set etc. was created won't be able to use the new instructions.

Assembly level programmers won't ever be replaced. Someone ultimately has to write the compiler. If we could have a program that could write the compilers for new hardware, presumably by the method of reading the manual and swearing at the manufacturers (which is, I understand, the current human method) we'd have about five minutes to turn it off before it created a number of humanoid robots to start slaughtering us :)

But is there any kind of optimization that could not theoretically be done by a compiler?

I wouldn't be surprised if the CS chaps around here could come up with something. Some situation that a human can spot easily but a methodical program never could. Any CS bods around? I read French Poetry at university.
Last edited on
Topic archived. No new replies allowed.