Since a compiler other than the interpreter only needs to translate the input and not run it, the performance itself should not be as problematic as the interpreter. Therefore, you should not write an interpreter, let them say Ruby or PHP, because it will be too slow.
However, what about compilers?
If you write a compiler in a scripting language, perhaps even with rapid development, you can reduce the source code and the initial development time in halv, at least I think so.
Of course: with a scripting language, I mean interpreted languages that have typical functions that make programming faster, easier and more enjoyable for a programmer, as a rule, at least. Examples: PHP, Ruby, Python, possibly JavaScript, although this may be a strange choice for the compiler
What do compilers usually write? I believe you will answer something low level like C, C ++ or even Assembler, why?
Are there any compilers written in scripting languages?
What are the benefits (dis) of using low or high level programming languages to write a compiler?
source
share