3 ms·
I'd say ease of package management. You can see this with Python too.
by olalonde 3mo ago
I'd say ease of package management. You can see this with Python too.
- inigyou 3mo agoPackage management is easier in Go than almost any other ecosystem, including Rust, Python and Javascript. And Go projects may have tens of package dependencies. Yet it's closer to a C++ project which has single-digit dependencies than a Javascript project which has tens of thousands.
- olalonde 3mo agoInteresting. When I learned Go a while ago, it didn't have a package manager. You just pulled down master branches directly into your global GOPATH. So pulling in a dependency was a big decision and people naturally favored "batteries included" libraries. That probably still permeates the culture today.
- inigyou 3mo agoThat is the package manager. The package has a URL. You import the URL and you're done.
- olalonde 3mo agoBack then there was no versioning. When you imported a URL, you had to hope that all your projects and transient dependencies happened to be compatible with whatever commit was currently sitting on the master branch. Because one update could silently break an unrelated project on your machine, adding a dependency was a bigger decision. That naturally led the ecosystem to favor fewer, larger libraries. PS: it looks like this issue was addressed in 2019 with the introduction of Go Modules.