[plt-scheme] OT- why are compilers not written in scheme?

From: Noel Welsh (noelwelsh at gmail.com)
Date: Tue Jan 5 06:46:44 EST 2010

To expand on this response:

Classic ML-style FP allows easy addition of functions while making
adding new data difficult. This situation suits compilers where you
have one data representation -- your intermediate representation --
and a number of passes that operate over that representation.
Furthermore pattern matching is great for processing these
representations, static type checking ala ML will warn you about
incomplete patterns, and FP representations of the data will typically
be more compact than OO representations (at least in the case of

Summary: A compiler is a pipeline. Pipelines are easy to model in FP.


On Tue, Jan 5, 2010 at 11:33 AM, Noel Welsh <noelwelsh at gmail.com> wrote:
> Historical baggage. Functional languages are excellent for writing compilers.
> N.

Posted on the users mailing list.