Live data from Hacker News

Go 1.23 Released

go.dev

41–50 of 106 posts

Re: Go 1.23 Released

#41
post #17

> Go telemetry is an opt-in system Great job Go. Hat tip and respect for this. Unlike .Net. I will enable this where it is appropriate.

> Great job Go. Hat tip and respect for this

Whoah. Easy there cowboy.

It was not opt-in when originally announced.

After an extended, shall we say, "lively" discussion on Github[1], they did the right thing and made it opt-in.

(N.B. The discussion was heavily moderated and redacted, it was even more "lively" at the time.)

[1]https://github.com/golang/go/discussions/58409

Re: Go 1.23 Released

#42
post #34

If you find the official release notes a bit dry (they really are), I've prepared an interactive version with lots of examples: - Iterators (range / types / pull / slices / maps). - Timer changes (garbage collection and reset/stop behavior). - Canonical values with the `unique` package. - HTTP cookie handling. - Copying directories. - Slices and atomics changes. https://antonz.org/go-1-23

Thank you for your service, this is awesome! I'd love to see language maintainers post interactive release notes like this.

Re: Go 1.23 Released

#43
post #34

If you find the official release notes a bit dry (they really are), I've prepared an interactive version with lots of examples: - Iterators (range / types / pull / slices / maps). - Timer changes (garbage collection and reset/stop behavior). - Canonical values with the `unique` package. - HTTP cookie handling. - Copying directories. - Slices and atomics changes. https://antonz.org/go-1-23

This is great, thank you.

Re: Go 1.23 Released

#44
post #13

Earlier quoted context omitted.

Are you talking about for key, val := range m.Range I like that a fair bit more than m.Range(func(key, val any) bool {

But now I have to understand what m.Range does, and I can't assume it's a slice or a map etc. Prior to this change, you could almost always correctly assume what a for loop is doing as it was very primitive. It's changes like this that will make Go less productive for users over time, IMO. Java-fication.

You put your cursor on the "Range" portion of m.Range, and hit "Jump to Definition".

You can also just not import things that do crazy things with iterators. Based on the history of the community, that will actually be fairly easy. I'm yet to see anything crazy with generics get into a library that I use. I'm abundantly positive there's going to be a dozen "hey let's go do crazy things with rangefunc" libraries in the next couple of weeks, probably some will even make it to HN (with predictable comments bemoaning how complicated Go is getting even though these libraries have an expected use rate in the low dozens of people in the next few years), but the odds of them penetrating into common practice remain low. (Higher than previous attempts at such libraries, because rangefunc fixes some basic issues with them. But still low overall, I think.)

I think you could go many, many years programming Go in the next few years and not encounter any funny iterators in real code. If you just assume the iterator is doing what it looks like it should be doing and isn't doing anything funny, you're going to be 99%+ correct in the Go programming world.

Re: Go 1.23 Released

#45
post #3

Opt-in telemetry. A very rare sight these days. Glad to see. Not even Mozilla does that with Firefox [1]. > Starting in Go 1.23, the Go toolchain can collect usage and breakage statistics that help the Go team understand how the Go toolchain is used and how well it is working. We refer to these statistics as Go telemetry. > Go telemetry is an opt-in system, controlled by the go telemetry command. By default, the tool…

Google can already see every installation of every Go program/package in existence, unless you set GOPROXY=direct (or a custom proxy). The default is to use https://proxy.golang.org, which is operated by Google.

Re: Go 1.23 Released

#46
post #17

> Go telemetry is an opt-in system Great job Go. Hat tip and respect for this. Unlike .Net. I will enable this where it is appropriate.

> Great job Go. Hat tip and respect for this Whoah. Easy there cowboy. It was not opt-in when originally announced. After an extended, shall we say, "lively" discussion on Github[1], they did the right thing and made it opt-in. (N.B. The discussion was heavily moderated and redacted, it was even more "lively" at the time.) [1] https://github.com/golang/go/discussions/58409

[flagged]

Re: Go 1.23 Released

#47
post #18

Earlier quoted context omitted.

And Google makes you call it something other than Go, like Firefox did to linux packagers: > The Go trademark and the Go Logo ( ) – collectively, the “Go Trademarks” – are trademarks of Google and are treated separately from the copyright license grants contained in the BSD-licensed Go repositories, as described below. > Substantially unmodified distributions¶ > Substantially unmodified distributions may use the Go T…

It's not 2006 anymore.

I don't understand what you mean by this. Are you saying you can patch out telemetry in Linux package managers are Firefox doesn't care? What does that have to do with 2006? I think GP has a valid point otherwise as people will just install the thing named Firefox and not check to see if there is a telemetry free version going by a different name.

Re: Go 1.23 Released

#48
post #24

Earlier quoted context omitted.

The change adds no syntax.

"for key, val := range m.Range" is syntactic sugar for using the m.Range iterator directly "m.Range(func(key, val any) bool". In a vacuum I think it's fine, but I don't want to see stuff like this getting added to the language routinely. I prefer a small language.

I think the key difference is that in a loop body you can return from the outer function. In a function passed to m.Range you can't.

Re: Go 1.23 Released

#49

From the release notes [1], which I think this post should actually point to: > For backward compatibility, existing usages of //go:linkname found in a large open-source code corpus remain supported. Any new references to standard library internal symbols will be disallowed. How does this work? Does the compiler have a whitelist of allowed uses? [1]: https://go.dev/doc/go1.23

The source has to be annotated to export the function.

Re: Go 1.23 Released

#50
post #24

Earlier quoted context omitted.

The change adds no syntax.

"for key, val := range m.Range" is syntactic sugar for using the m.Range iterator directly "m.Range(func(key, val any) bool". In a vacuum I think it's fine, but I don't want to see stuff like this getting added to the language routinely. I prefer a small language.

Go 1.22 is still right there.
Post reply on HN