Do you write the first compiler in another programming language? And the fully rewrite the compiler once the first compiler is mature enough to produce reliable builds, compile the new compiler on that first compiler, in order to have a compiler that is written in the same language as the one it’s compiling?

If this is the case, and this might be a stupid question, why would want to? You’ll essentially be throwing away potentially years of work on that first compiler just to have a circularly compiling programming language? What benefits could this have to make the extra effort worth it?

  • @ttmrichter
    link
    32 years ago

    My main question to ask back to you would be why do people create new languages?

    There are as many answers to that question as there are language implementers. Some of the reasons include:

    1. People simply don’t know how massive and diverse the language community is.
    2. People want to do it as a personal challenge. (That was my reason.)
    3. People want a language that is, broadly speaking, just like A but with feature1 and without feature2. (I suspect this is the most common reason and it leads to a phenomenon I call “OOP Heartbreakers” because the product is usually something that is largely indistinguishable from existing, established languages but has no support and thus no real hope of success.)
    4. People are introducing an entirely new way of looking at programming (the cringe-inducing word “paradigm” has entered the chat) which is best fostered by a different way of structuring code. (This is why we have languages like Prolog and the ML family and …)
    5. People have specific needs that aren’t being met by existing languages for their projects. (Ask me about my unmet needs for embedded systems programming…)
    6. … and a cast of thousands of others …