Home > Article > Backend Development > What is the underlying language of Golang?
What is the underlying language of Golang
In the earliest times, Golang was implemented in C and assembly.
Later Golang implemented bootstrapping and rewrote the compiler, so now it is implemented using Golang itself.
If you invent a new language CNifeLang, you first need to write a CNifeLang compiler in an existing language, for example, use Golang; you write a CNifeLang in Golang The compiler can successfully compile any legal CNifeLang source code into an equivalent target program. Then use CNifeLang to write a program, which has the same function as the compiler you wrote in Golang. Use the compiler implemented in Golang to compile the program, and you will get a CNifeLang compiler implemented in CNifeLang. Because the function of this program is exactly the same as the compiler written in Golang, you can use this compiler to compile CNifeLang, so CNifeLang implements bootstrapping.
Excerpt from Zhihu, author: CNife
For more golang knowledge, please pay attention to the golang tutorial column of the PHP Chinese website.
The above is the detailed content of What is the underlying language of Golang?. For more information, please follow other related articles on the PHP Chinese website!