As I know, go-lang is written by C at the beginning, and now it is written by itself. I want to figure out some fundamental implementations of go-lang, such as multi-return-value-of-function, which probably use structure I guess.
But now the go-lang version of go-lang source code has conceal these details, so where can I get the C version of go-lang source code (history version)? I've checked golang.org, nothing found.
Thanks.
Yes. it's compiling exactly in the same sense any C program is compiled. Everything is statically linked. Why does golang have runtime which does garbage collection etc.
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Go (Golang) ProgrammingThe compiler for the language was originally written in C but is now written in Go as well, which keeps the language self-hosted. Go, as well as many of its IDEs and libraries, is also distributed under the appealing open-source license.
Because Go is compiled to machine code, it will naturally outperform languages that are interpreted or have virtual runtimes. Go programs also compile extremely fast, and the resulting binary is very small.
Go 1.5 Release Notes
The compiler and runtime are now written entirely in Go (with a little assembler). C is no longer involved in the implementation, and so the C compiler that was once necessary for building the distribution is gone.
Therefore, check out the source code for previous release: release-branch.go1.4
.
For example,
git clone https://go.googlesource.com/go --branch release-branch.go1.4 --single-branch go1.4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With