To make the comparison a little more valid, we can strip symbols with a compiler flag and pass the result through `upx` for to build a stripped, compressed binary at only 300Kb:
Also worth noting that the author is incorrect about the Avian example being self-contained--it dynamically links against 4 libraries (on OS X, anyway) while the Go version links against zero.
Further, the Avian example is broken on OS X (the GUI loads, but immediately freezes).
Of course, the applications aren't doing the same work, so comparing the binary sizes is silly. I just wanted to point out that avian's tricks are readily accessible for Go programs as well.
All forwards-compatibility issues were only "theoretical" issues that didn't "matter in practice" until a new release of the platform came out and suddenly they did.
"You know, when we had our first C++ compiler, at AT&T, I compiled 'Hello World', and couldn't believe the size of the executable. 2.1MB" -- Barney Soupstuck, 1998
> It’s not a trivial Hello World app at all, yet it’s a standalone self-contained binary that clocks in at only one megabyte. In contrast, “Hello World” in Go generates a binary that is 1.1mb in size, despite doing much less.
I wrote a jvm-to-go cross compiler and just trying to compile some of the Java stdlib takes forever in Go. Now, this is probably mostly due to how I solve thing like polymorphism and inheritance, but it goes to also show the different approaches to the stdlib. Go eliminates a ton of unused code because their stdlib doesn't have a ton of circular references that're hard to break.
If BC concerns weren't a thing, a fresh Java stdlib would remove a ton of the size complaints.
>
> [Goes on to show how Hello World is just 1 MB, which is smaller than Go's Hello World]