What are modern and old compilers written in?

Posted by ulum on Stack Overflow See other posts from Stack Overflow or by ulum
Published on 2010-03-30T09:31:41Z Indexed on 2010/03/30 9:33 UTC
Read the original article Hit count: 617

As a compiler, other than an interpreter, only needs to translate the input and not run it the performance of itself should be not that problematic as with an interpreter. Therefore, you wouldn't write an interpreter in, let's say Ruby or PHP because it would be far too slow.

However, what about compilers?

If you would write a compiler in a scripting language maybe even featuring rapid development you could possibly cut the source code and initial development time by halv, at least I think so.

To be sure: With scripting language I mean interpreted languages having typical features that make programming faster, easier and more enjoyable for the programmer, usually at least. Examples: PHP, Ruby, Python, maybe JavaScript though that may be an odd choice for a compiler

  • What are compilers normally written in? As I suppose you will respond with something low-level like C, C++ or even Assembler, why?

  • Are there compilers written in scripting languages?

  • What are the (dis)advantages of using low or high level programming languages for compiler writing?

© Stack Overflow or respective owner

Related posts about compilers

Related posts about scripting-language