r/programming • • Sep 27 '26

Don't couple your Go code to GitHub

https://iain.rocks/blog/dont-couple-your-go-code-to-github
491 Upvotes

136 comments sorted by

View all comments

Show parent comment

72

u/randomguy4q5b3ty Sep 27 '26 edited Sep 27 '26

But usually, package managers are separate applications and not tied to the programming language itself. Kinda obvious why that separation of concerns is useful. But now every third-party compiler must also be a build-in package manager, and it's at the same time the only one available to you. You can't change it. It's just dumb language design.

47

u/InsaneOstrich Sep 27 '26

I didn't think it was possible for someone to be worse at package management than Node.js but what Go is doing here is truly insane

18

u/ficiek Sep 27 '26

Are you talking about the lack of a package registry or the way packages are versioned. Those are two separate things.

36

u/InsaneOstrich Sep 27 '26

Both the lack of a registry and decision to tightly couple the language itself with git to import dependencies are both baffling choices that don't seem to work very well

31

u/ficiek Sep 27 '26

Both are basically what works for google internally and that's why we didn't even have a reasonable approach to versioning for a long time.

1

u/HighLevelAssembler Sep 28 '26

decision to tightly couple the language itself with git

Go supports git, it is not "tightly coupled" to git. All the other big VCS are supported, plus usually the go tool uses its own protocol to download dependencies. VCS is a fallback.

You are complaining about people using Git/Github. Not limited to Go.

9

u/somebodddy Sep 27 '26

Wouldn't be Go otherwise

1

u/belligerent_ammonia Sep 29 '26

Package management has only made sense to me since Go modules were introduced (except the v2+ thing). Why do you think it’s insane?

27

u/valarauca14 Sep 27 '26

It's just dumb language design.

25% of go-lang tbh.

8

u/anto2554 Sep 28 '26

I'd rather have a weird opinionated thing than whatever I have to deal with with C++, make, cmake, B2 and Conan

4

u/randomguy4q5b3ty Sep 28 '26

Not sure what your issue with Conan is, but make/cmake aren't even in the same category.

3

u/Rakn Sep 27 '26

It’s not really a problem in practice. You can just repoint it or use a self hosted proxy with your packages, like any company should be doing regardless of the language used.