24

In which language is F#'s compiler written?

I've heard that F#'s compiler is written in F# :)
(each next version of F# compiler is written on its previous version)
But:
1. Can't google if it's true.
2. If it's true, in which language is the first version of the F# compiler written?

Joel Mueller
  • 28,324
  • 9
  • 63
  • 88
alex.b
  • 4,547
  • 1
  • 31
  • 52

1 Answers1

42

The F# compiler is written in F#. The source code is available.

It was originally bootstrapped years ago using OCaml, I believe (and perhaps a little C++ as well). (There is still a non-trivial subset of F# that cross-compiles with OCaml, though the F# compiler source base has long since diverged from that.)

The current implementation always uses an LKG (last-known-good) set of binaries (.NET DLLs and EXEs) to bootstrap itself when building from source.

TeaDrivenDev
  • 6,591
  • 33
  • 50
Brian
  • 117,631
  • 17
  • 236
  • 300
  • 24
    If by 'convoluted' you mean 'standard procedure for all self-hosted compilers', then yes! :) – Brian Dec 08 '10 at 21:47