Hacker News new | ask | show | jobs
by Thaxll 1367 days ago
No one really care about binary size increase , especially because you can run a Go binary in a docker image with 0 dependencies ( scratch image ) which has a very small size.
3 comments

That's not true. I've warmed up a lot to Go over the last 6 months. I enjoy writing it and I find it useful. However, it still frustrates me that the base binary size is something like 15 MB. That being said, if you add a bunch of static linking into a C++ or Rust app the sizes may be comparable. But because Go frontloads so much stuff with it's forced static linking the binary sizes can become unruly.

You can imagine transfer costs in a CDN, storage, etc all mattering in the edge cases. Not everyone would have this problem but if your Go app is sufficiently popular and you need to distribute it you may see this as a problem.

do you know how things like tzdata and locale are handled in a single Go executable docker image ?
tzdata, at least, can be embedded in your binary: https://pkg.go.dev/time/tzdata
You can build a much smaller 0 dependency binary in Rust/C so what's the value prop for Go here?
The single biggest silver bullet for provable bug reduction that has ever been invented: GC.

Perhaps the Rust burrow-checker will prove to be the second silver bullet for bug reduction, but for now, the only thing that has ever been invented in programming language design that provably reduces the amount of bugs in an application is having a GC (not types, not getting rid of null values, not monads or other HKTs, not CSP).

The value prop is it's not Rust or C?
Sounds like a sidegrade to be honest, not worth the massive bins