Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I haven't actually used Go, but one of its big strengths seems to be that you get a binary with no dependencies (beyond libc I believe) at the end of it. You can just deploy it through a file copy and have it just work.


So can you with D.

With D, in addition, you can link against C shared libraries (dynamic linking) AND you can write standalone libraries in D that even C can link against (see Mir/betterC).

AFAIK, you can do neither of these in Go.


Well, Go will require compilation just like C++. The strength is its build tooling seems better integrated with the language implementation. C++ has make and friends but honestly, I prefer Go's. This is all history. Go is designed from the ground up with pitfalls of other languages in mind. Rust is obviously even better at this, with Golang as a case study.

For production you want to omit things like debug from binary so your binary is smaller. You have to play with the build flags. I can get a simple TCP server in Go in just a dozen lines but the binary is around 5MB before optimization.

[1]: https://blog.filippo.io/shrink-your-go-binaries-with-this-on...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: