patternMinor
compilers and their inheritance
Viewed 0 times
andtheirinheritancecompilers
Problem
If compilers have an inheritance of compilers(for example, a compiler needs to be compiled by another compiler, and that compiler needs to be compiled by another compiler, and so on) then if there is an inefficiency in one of the compilers up the line of inheritance(like the compiler's compiler's compiler's compiler), would the current compiler inherit that inefficiency?
Solution
No, because compiler runtime is irrelevant to quality of produced code.
It would not propagate.
It will only once slow down compiling time in flawed compiler, there is no possibility of making next compiler slower (it will be essentially the same one).
Let me give you example:
By analogy you have one recipe, chain of writters and one cook.
Writters are passing recipe one to another and their responsibility is to change words according to given dictionary.
None of then is making mistakes. But you can switch one of writters with slower writing one.
The cook gets the same recipe always, the only difference is time, and delay is caused by this inefficient writter (not by successor).
You should read this thread: C compiler, there are some awesome answers related to your question.
It would not propagate.
It will only once slow down compiling time in flawed compiler, there is no possibility of making next compiler slower (it will be essentially the same one).
Let me give you example:
By analogy you have one recipe, chain of writters and one cook.
Writters are passing recipe one to another and their responsibility is to change words according to given dictionary.
None of then is making mistakes. But you can switch one of writters with slower writing one.
The cook gets the same recipe always, the only difference is time, and delay is caused by this inefficient writter (not by successor).
You should read this thread: C compiler, there are some awesome answers related to your question.
Context
StackExchange Computer Science Q#45673, answer score: 2
Revisions (0)
No revisions yet.