Hacker News new | past | comments | ask | show | jobs | submit login

I don’t like a lot of Go features but the GOPATH system is really quite good (until you care about pinning versions, when it becomes not worse than Python).



GOPATH is going away with vgo so it wasn't really good at all as it forced the developer to adopt a specific folder organization. The fact that go maintainers acknowledged this issue is a sign they are ready to move the language forward.


> forced the developer to adopt a specific folder organization

Well, so does C (and basically everything else). Alternatively, you can pass tons of -I and -L flags to your compiler calls but you can do that with Go, too.

The point of GOPATH was to make this unnecessary because everything can be deduced from the source code and its location within the file system.


You have it backwards. C doesn't restrict where I can keep my source tree.


I mean, the C toolchain has plenty of baked-in paths where it expects to find something. If project foo depends on project bar, project foo is not automatically going to look at ../bar when building. You either set that up manually, or you put everything in /usr/include and /usr/lib.

"Set that up manually" usually consists of an m4 script that takes 15 minutes to run as it tries to look for all the dependencies ("./configure"). It's flexible, but it's not great.


But at least that makes it no harder to ask for a specific version of something.

Go not having version locks for dependencies by default is a major failing. Fortunately it looks like that will be changing.




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

Search: