Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In which language is F#'s compiler written?

Tags:

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?

like image 988
alex.b Avatar asked Dec 08 '10 21:12

alex.b


People also ask

What does F mean in Fortran?

The F specifier is for decimal real data items. The general form is F [ w [ . d ] ] : The F w and F w.d edit specifiers indicate that the field to be edited occupies w positions.

Why F sharp is not popular?

However, functional programming languages are not highly popular. Most programmers never learn any functional programming languages, choosing instead to learn one of C#, Java, C++, Javascript and stick with it indefinitely. For that reason, F# is stuck in a position of being the number 3 .

Is F# related to Fortran?

Nope. Not only the syntax of both languages is completely different, but even the paradigm they implement is different: F# is a functional language, while Fortran is essentially imperative.


1 Answers

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.

like image 131
Brian Avatar answered Sep 18 '22 10:09

Brian