4 ms·
Hi all. Something I left out of the post that I should have mentioned: if you are wondering why a Hello World program is hundreds of kilobytes instead of tens l
by crawshaw 10y ago
Hi all. Something I left out of the post that I should have mentioned: if you are wondering why a Hello World program is hundreds of kilobytes instead of tens like a C program, it is because Go programs are statically linked.
You can dynamically link Go on linux to see similar numbers:
$ go install -buildmode=shared std
$ go build -linkshared hello.go
$ ./hello
Hello, World!
$ ls -l hello
-rwxr-x--- 1 crawshaw eng 15713 Aug 18 19:26 hello
(Dynamic linking in Go was funded by Canonical, which is pretty cool!)