Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

go

I think the title is self explanatory.

like image 231
digiarnie Avatar asked Jul 25 '10 01:07

digiarnie


People also ask

Is Golang built on C?

Golang was formerly written in C but is now written in Go itself. As of December 2013, the Go team announced their transitioning of the compiler to Go. Since February 2015 the implementation of C has been deleted and the compiler is now self-hosting, with the new compiler first introduced in Go 1.5.

Is Golang compiled language?

Go is a compiled language. This means we must run our source code files through a compiler, which reads source code and generates a binary, or executable, file that is used to run the program.

Is Go language based on Java?

Java vs Go: A quick glance Java is the older and more widely used programming language. It is object-oriented, has a larger community—thus library, and relies on the Java virtual machine (JVM). Go, or Golang, is newer, supports concurrency, is more readable, and is not object-oriented.

What language is spoken in Go?

The Go programming language Short for Golang, Go was first designed at Google by Robert Griesemer, Rob Pike, and Ken Thompson in 2007. Go is a statically typed, compiled programming language that is open-sourced and maintained by Google.


2 Answers

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.

like image 164
Artelius Avatar answered Sep 28 '22 06:09

Artelius


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.

like image 25
zneak Avatar answered Sep 28 '22 06:09

zneak