What language is the compiler of Go programming language written in?

Go

Go Problem Overview


I think the title is self explanatory.

Go Solutions


Solution 1 - Go

Programming languages aren't programs, hence they're not "written" in any language. They are often described by formal grammars (e.g. BNF).

Interpreters and compilers for programming languages are programs and so must be written in some kind of programming language.

Go has at least two compilers, gc and gccgo. The former was written in C, but is now written in Go itself. While the latter is a gcc frontend written mainly in C++. Go's libraries are written in Go.

Solution 2 - Go

Look at the source and C for yourself, if I may say.


EDIT The Go team announced in December 2013 that they will be transitioning the compiler to Go. As of February 2015, the compiler is exclusively self-hosting, as the C implementation was deleted. The new compiler shipped for the first time with Go 1.5.

Solution 3 - Go

It's written in C. The libraries are written in Go itself.

Edit: Now the compiler has been rewritten in Go, so it is fully self-hosting.

Solution 4 - Go

"go compiler written in go and little of assembly"

"but gccgo is written in c c++ and go"

Rob Pike

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiondigiarnieView Question on Stackoverflow
Solution 1 - GoArteliusView Answer on Stackoverflow
Solution 2 - GozneakView Answer on Stackoverflow
Solution 3 - GoCharlesView Answer on Stackoverflow
Solution 4 - GoAhmedView Answer on Stackoverflow