Re:Ask HN: Go programming language is over ten years old. Wh...
by rowanseymour on Sunday October 25, 2020 @03:05PM
(#24888945)
All that has changed now thankfully, no more $GOPATH, put your go projects wherever you want, and there's a decent dependency system.
Re:Ask HN: Go programming language is over ten years old. Wh...
by Insanity on Sunday October 25, 2020 @03:04PM
(#24888938)
This is only true if you don't use go modules - so for recent projects you would not have this problem.
Re:Ask HN: Go programming language is over ten years old. Wh...
by intortus on Sunday October 25, 2020 @03:06PM
(#24888948)
This is no longer the case. Now you instantiate a go module wherever you want by running “go mod init” (which just produces a trivial text file). Each module’s dependencies are now well encapsulated. There’s no longer a need for a messy globally shared GOPATH space.
With every other language, you checkout the code in any directory you want (as long as there are no spaces in the path), run either a language-specific tool or the traditional configure/make combo to compile and optionally install, and you're done. With Go, not only you had to put the code in a specific place in your home directory, but also every code written in Go you'd ever want to compile had to also be placed in that specific directory in a specific way, mixed with the code of other projects, instead of allowing you to place them separately in your personal projects directory hierarchy (which you already use with every other programming language).