Lets compare c and go: Hello_world.c :
#include
int main(){
printf(\"Hello world!\");
}
Hello_world.go:
More compact hello-world example:
package main
func main() {
print("Hello world!")
}
We are skiped large fmt package and noticeably reduced binary:
$ go build hello.go
$ ls -lh hello
... 259K ... hello2
$ strip hello
$ ls -lh hello
... 162K ... hello2
Not so compact as C, but though measured in K not M :) Ok, it is not general way just shows some ways to optimize a size: use strip and try to use minimum packages. Anyway Go is not language for making tiny sized binaries.