Home  >  Article  >  Backend Development  >  What is the underlying language of Golang?

What is the underlying language of Golang?

angryTom
angryTomOriginal
2020-03-17 11:16:084987browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn