[Haskell-cafe] Compilers written in Haskell?

Viktor Dukhovni ietf-dane at dukhovni.org
Tue Jan 28 22:38:28 UTC 2020


On Tue, Jan 28, 2020 at 08:50:48AM +0100, Tony Zorman wrote:

> Indeed, this one is interesting because it's *not* a haskell-like
> language.
> 
> I would be interested in more of these kinds of e get the idea that
> haskell is only good for implementing compilers for haskell-like
> languages :)

It is perhaps worth keeping in mind that there are strong incentives for
mainstream compilers for mainstream languages to be self-hosting.  Thus
C compilers (mostly) in C, Haskell compilers (mostly) in Haskell, JDK
morstly in Java, etc., and e.g.

    https://stackoverflow.com/questions/34729930/what-language-was-used-to-write-rust-compiler

    (originally it seems O'Caml, now Rust)

This is especially true when the language both provides and uses a core
library built along with the compiler.

Thus compilers that are written in some other language are more likely
be for a niche DSL.

-- 
    Viktor.


More information about the Haskell-Cafe mailing list