News for hackers. Stuff that matters.
Re:Go 1.17 is deprecating the traditional use of 'go get' by jimmaswell on Friday June 25, 2021 @10:36AM (#27631303)
This is everything wrong with modern languages/toolsets. Constantly changing everything, pulling the rug out from people who just want to get work done and wasting everyone's time who googles how to do something and has to go through 3 outdated answers to figure out the current way to do something. Deprecation and breaking changes should be an absolute last resort in the face of overwhelming necessity, not something done on a whimsy to please the aesthetic preferences of some new project manager who needs to feel important.
Re:Go 1.17 is deprecating the traditional use of 'go get' by throwaway894345 on Friday June 25, 2021 @10:47AM (#27631454)
I don't know that I disagree per se, but GOPATH and modules mean that the tooling has to handle two different cases which are often surprisingly ambiguous and it creates real headaches for the user. There's a lot to be said for having a single path forward even if it means existing users will have to experience some mild pain (i.e., learning a new workflow, rewriting some build scripts, etc) one time. Ideally language developers would have perfect foresight from the outset such that no changes are ever needed to the language, but sadly such language developers are hard to come by.
Re:Go 1.17 is deprecating the traditional use of 'go get' by altfredd on Friday June 25, 2021 @04:30PM (#27635867)
> GOPATH and modules mean that the tooling has to handle two different cases...

No, the main thing, that GOPATH meant, is that Google (and everyone else) had to make their Go libraries open-source — since entire logic of GOPATH revolves around building stuff, downloaded from Github.

Once Google management decided to be serious about pushing Go to masses, they hurriedly rushed to erase GOPATH from history (just like they erased "Don't be evil" slogan from Internet after getting serious about doing business).

Re:Go 1.17 is deprecating the traditional use of 'go get' by dcow on Friday June 25, 2021 @06:05PM (#27636837)
You don't know shit. I “hate” Go and Google with a mild passion (I mean this lightly, rhetorically) and still know enough to explain to you that modules have nothing to do with publishing binary blobs (which like isn’t even a thing in the go ecosystem) or private repos. Modules add a layer of indirection and solve so many actual problems with the GOPATH like “how do you have a dev copy with local changes and a main copy of a library on the same machine?”, “how do you manage/scope different versions of the same dependency between/to different projects?”, etc. GOPATH was so abysmally short sighted only Google could have created it.
Re:Go 1.17 is deprecating the traditional use of 'go get' by altfredd on Saturday June 26, 2021 @10:31AM (#27642175)
Just checked, and looks like you are right — modules don't offer more facilities to distribute proprietary code than GOPATH already did.

I stand corrected.

Re:Go 1.17 is deprecating the traditional use of 'go get' by jen20 on Friday June 25, 2021 @04:59PM (#27636210)
...what?

GOPATH has nothing to do with GitHub. It is one of the places that has special case handling, but is absolutely not the purpose of GOPATH. Case in point: the VM I have to build some legacy stuff using GOPATH does not have a _single_ dependency from GitHub. Not one. Nor does it contain any open source code, besides the standard library.

Re:Go 1.17 is deprecating the traditional use of 'go get' by altfredd on Saturday June 26, 2021 @10:48AM (#27642326)
Indeed, — GOPATH does not imply using Github, and Github does not imply open-source (even if it is one of the most widely used ways to host open-source).

The logic of GOPATH and "go get" just so happen to revolve around building packages, fetched from source code repository. This logic used to be a stop-gap, written during early stages of Golang development, and makes it awkward (at best) to distribute proprietary Go libraries. I assume, that Google is introducing module system (and aggressively deprecating GOPATH) to work around this issue (among others).

Re:Go 1.17 is deprecating the traditional use of 'go get' by throwaway894345 on Friday June 25, 2021 @05:58PM (#27636772)
Yeah, the parent seems to think that GOPATH has something to do with pulling from GitHub and that modules implies some central repository which isn't the case at all. If you use modules, you're also pulling from GitHub directly in most cases, although nowadays there is a public caching proxy in the middle IIRC. And in both cases you could/can use private repositories.
Re:Go 1.17 is deprecating the traditional use of 'go get' by loudlambda on Friday June 25, 2021 @10:44AM (#27631401)
Go is really bad at this. They claim to care strongly about backwards compatibility, but have repeatedly changed and broken how tooling works.
Re:Go 1.17 is deprecating the traditional use of 'go get' by randomdata on Friday June 25, 2021 @11:02AM (#27631641)
It is Go, the language, that provides a backwards compatibility guarantee.

Another tenant of Go, the language, is specification before implementation. There specifically so that many implementations of the language are created and do not become dependant on quirks of a single set of tools and enabling users to choose which tooling they prefer.

Point being, there is a very clear line drawn between Go the language and the Go distribution. Guarantees provided by one are not necessarily applicable to another. Nor do they apply to gcc-go or tinygo.

Re:Go 1.17 is deprecating the traditional use of 'go get' by 5e92cb50239222b on Friday June 25, 2021 @10:43AM (#27631389)
> This is everything wrong with modern languages/toolsets

Go can hardly be called a modern language. The usual argument we hear on HN is that it has an absolutely stellar backwards compatibility story. Are we losing that too?

Re:Go 1.17 is deprecating the traditional use of 'go get' by throwaway894345 on Friday June 25, 2021 @10:50AM (#27631486)
> Go can hardly be called a modern language.

I'm not sure what this means exactly, but it's a significant advance in simplicity and productivity in my experience.

> The usual argument we hear on HN is that it has an absolutely stellar backwards compatibility story.

This refers to the compatibility of the language, not necessarily the tooling. Even still, this is a single change, there's no need to panic about losing backwards compatibility just yet.

Re:Go 1.17 is deprecating the traditional use of 'go get' by hda111 on Friday June 25, 2021 @01:58PM (#27634185)
No language without FP or OOP can be called modern. Go is an ancient version of C with less features.