News for hackers. Stuff that matters.
Re:Golang at CloudFlare by genbattle on Tuesday July 03, 2012 @06:20PM (#4196504)
With other languages such as C/C++ if you link a library into your program statically, that library may dynamically load other dependencies. In Go, all dependencies have to be statically compiled into that package.

Rob Pike made a good point about this in one of the Go talks [1] (I think it was the "Meet the Go team" talk) when they were talking about package management and the static linking, and how in C++ you could get massive chains of useless includes (I think is came out of a question on the speed of the Go compiler). His reasoning was that all the code you need to compile a package should be in the one package binary. You shouldn't need to worry about having other 3rd-party packages that your dependency depends on installed on the target system.

[1] http://blog.golang.org/2012/07/go-videos-from-google-io-2012...

Re:Golang at CloudFlare by pjmlp on Wednesday July 04, 2012 @01:33AM (#4197777)
> In Go, all dependencies have to be statically compiled into that package.

This is not true. If you make use of cgo, the dependencies are linked dynamically.

Re:Golang at CloudFlare by 4ad on Wednesday July 04, 2012 @07:52AM (#4198986)
Using cgo is an exception rather than the rule, and when Rob talks about package dependencies he means any file required for building that package, not only the shared objects. This includes C/C++ header files. Even with cgo, to use a package that uses cgo you only need that package archive, you need not care about what files that created that package.
Re:Golang at CloudFlare by pjmlp on Wednesday July 04, 2012 @09:48AM (#4199389)
Like in every other compiled language that has modules.
Re:Golang at CloudFlare by genbattle on Wednesday July 04, 2012 @04:49PM (#4200806)
Yes, you are right. I was referring to pure Go packages.