10 ms·
Go 1.25 Release Notes
- bitbasher 1y ago1.25 tag was released; https://github.com/golang/go/releases/tag/go1.25.0 https://github.com/golang/go/releases/tag/go1.25.0
- Gobd 1y agoYay new version! Not the most exciting (as Go releases tend to be which is good), but hopefully jsonv2 and greentea can get some testing and be standard in 1.26
- latchkey 1y ago> greentea I didn't know what it is and had to look it up. Looks like a new GC. https://github.com/golang/go/issues/73581 https://github.com/golang/go/issues/73581
- halJordan 1y agoIs reading the posted article just something we don't do anymore?
- latchkey 1y agoHaven't done that in ages. I open both the page and the comments. The first few comments usually dictate if I'm going to bother with the page. What I want next is just an AI summary of the comments with vibe analysis ("Is this worth reading?).
- rs186 1y agoTo be fair, I read the article but still don't know what greentea is. The article never directly refers to the new GC by this name. It appears in a command line option value, that's about it.
- vips7L 1y ago> The new garbage collector may be enabled by setting GOEXPERIMENT=greenteagc at build time I don’t know if you’d count that as directly referring to it by name but it’s there.
- awesome_dude 1y agoIf people were intended to read we wouldn't have to yell at them to RTFM!!
- disintegrator 1y agoI just love how this language marches forward. I have so many colleagues that hate many aspects of it but I sit here combining Go, Goa and SQLc writing mountains of code and having a fairly good compiler behind me. I understand what I’m missing out on by not using stricter languages and so often it’s a totally fine trade off.
- devmor 1y agoI did not like it at first but it has grown on me. I still have my gripes, which are mostly things that come from its overall architecture and will never be resolved, but it is pretty enjoyable to use for the limited domain I use it in at work.
- danudey 1y agoI've gotten used to golang, though it's still not my favourite language to program in by any stretch. One issue I've been having, though, is the documentation. Documentation for third-party modules in Python is fantastic, almost universally so. In nearly every case of using a third-party library, large or small, there's sufficient documentation to get up and running. Golang libraries, however, seem to be the opposite. In most cases there's either no documentation whatsoever on how to use things, or, more commonly, there is example code in the readme which is out of date and does not work at all. The IDE integration with golang is great, and it makes some of this a bit easier, but I also still get a ton of situations where my editor will offer some field or function that looks like what I want (and is what I'm typing to see if it will autocomplete) but once I select it it complains that there's no such field or function. Still haven't figured that out. So yeah, I dunno. The language is 'great'; it certainly has some extreme strengths and conveniences, like the fact that 'run this function with these arguments in a separate thread' is a language keyword and not some deep dive into subprocess or threading or concurrent.futures; the fact that synchronization functionality is trivially easy to access; Sync.Once feels so extremely obvious for a language where concurrency is king, and so on. Still, the ecosystem is... a bit of a mess, at the best of times. Good modules are great, all other modules are awful.
- leoqa 1y ago
- nunez 1y ago> LookupMX and Resolver.LookupMX now return DNS names that look like valid IP address, as well as valid domain names. Previously if a name server returned an IP address as a DNS name, LookupMX would discard it, as required by the RFCs. However, name servers in practice do sometimes return IP addresses. This one is interesting; which servers return an IP address as a record? Why would they want to do this?
- TheDong 1y agoIf you look at the github issue related to the PR, you'll see some examples: https://github.com/golang/go/issues/56025#issuecomment-2066719220 https://github.com/golang/go/issues/56025#issuecomment-20667... Looks like the original poster on that thread is making it because Mailgun uses Go, and was running into issues related to this: https://github.com/golang/go/issues/56025#issuecomment-2672081851 https://github.com/golang/go/issues/56025#issuecomment-26720...
- deleted 1y ago[deleted]
- nulld3v 1y agoNew `encoding/json/v2` package (hidden behind `GOEXPERIMENT=jsonv2` flag)! It brings perf improvements and finally allows devs to implement custom marshalers for external types: > Alternatively, users can implement functions that match MarshalFunc, MarshalToFunc, UnmarshalFunc, or UnmarshalFromFunc to specify the JSON representation for arbitrary types. This provides callers of JSON functionality with control over how any arbitrary type is serialized as JSON. Awesome stuff.
- zx8080 1y agoWow, top comment about json. (Edit: not top 1 anymore, but still the point). It's ironic that the information technology and software engineering industry is so much "json parsing and repacking" one.
- trenchpilgrim 1y agoTo be fair, the existing json package in Go's standard library is somewhat infamous because it is non-streaming, so it has performance issues with large documents. one of the goals of json/v2 was to remedy this.
- gwd 1y agoI mean, I get what you're saying, but the fact is 1. Golang is used in web and api servers 2. Json is the lingua franca of data for the web, so golang does a lot of json processing 2. The golang stdlib json packages haven't had much attention in the last decade I was just thinking recently that my biggest pain point with the upstream JSON packages was the fact that you can't add easily add custom marshal / unmarshal code to objects in a package you don't control. I'm actually really excited about this change. The other reason this is at the top of the list, of course, is that there are no major interesting language features being added. This is a combination of the fact that golang is a pretty mature language, and the slowness of the team to adding new language features; both of which I appreciate.
- the_gipsy 1y agoThe irony is that go has taken the "web backend" niche, yet it sucks notoriously at JSON. It's a complete joke TBH, and no amount of patching can ever fix zero-values, the root of all evil in go.
- deleted 1y ago[deleted]
- deleted 1y ago[deleted]
- kristianp 1y agoIncludes [1], which fixes the bug which was blogged about in "How we tracked down a Go 1.24 memory regression" [2,3]. [1] https://github.com/golang/go/issues/72991 https://github.com/golang/go/issues/72991 [2] https://www.datadoghq.com/blog/engineering/go-memory-regression/ https://www.datadoghq.com/blog/engineering/go-memory-regress... [3] https://news.ycombinator.com/item?id=44597550 https://news.ycombinator.com/item?id=44597550 (24 days ago)
- tonymet 1y agoi love how complete golang tooling is. go/analyzer framework is quite advanced and I don't know of other languages that offer accessible AST support .
- whartung 1y agoJDK, I believe, has first class support for accessing the Java AST.
- cryptos 1y agoThere are some internal compiler APIs (so, not officially supported) and some external tools to do so.
- foresto 1y agoDoes this count? https://docs.python.org/3/library/ast.html https://docs.python.org/3/library/ast.html
- tonymet 1y agonot really. that's just an API. i mean all of the tooling and how commonly the API is put to use
- Zambyte 1y agoGo is one of the last languages I'd think about when considering access to the AST. The first would be Lisp.
- tonymet 1y agothere are tons of utilities. and the fact that i've written some means it's pretty easy
- Zambyte 1y agoRight, I'm not saying it's impossible in Go, but it's so easy in Lisp you're bound to do it even by accident. There are no "AST utilities" in Lisp because the AST is just a normal list / tree of primitive values (of the `symbol` type). You operate on code structures with the same libraries that you operate on a list / tree of numbers, strings, etc. Code is data.
- abtinf 1y agoWaitGroup.Go looks great. Going to be able to delete a lot of code, replacing boilerplate with calls to it.
- lenkite 1y agoI wish they moved ErrorGroup into the base standard library itself. Most functions return errors in Go anyways.
- dotwaffle 1y agoJust watch as most libraries now update their go.mod to say 1.25, despite using no 1.25 features, meaning those who want to continue on 1.24 (which will still have patch releases for six months...) are forced to remain on older versions or jump through lots of hoops. It's a "minimum" version, not a dependency lock!
- konart 1y ago>Just watch as most libraries now update... Haven't seen anything like this. Most packages actually have 1.13 in their go.mod Rarely do I see at least 1.19
- dotwaffle 1y agoNow that I think about it more, when I've seen it happen before, it tends to be on projects that use dependabot / renovate. If any of those updates depend (directly or transitively) on a later version of Go, the go.mod would be bumped accordingly for them. I have a vague feeling it was related to testcontainers or docker, and at the time that job's Go install was always at least 6 months behind. At least with recent Go, it'll switch to a later version that it downloads via the module proxy, that would have helped a lot back then :S
- lordofgibbons 1y agoNever seen this happen. Most popular libraries support at least 2 previous versions
- bitbasher 1y agoThis is a common issue with Rust projects as well. At least with Rust you have the idea of "MSRV" (minimum supported rust version). I've never heard it discussed within Go's community. There's no MSGV. Everyone pins the latest. This also plagues dependencies. People pin to specific version (ie, 1.23) instead of the major version (at least 1.0 or at least 1.2, etc).
- dotwaffle 1y ago
- pjmlp 1y ago[flagged]
- anal_reactor 1y ago[flagged]
- LambdaComplex 1y agoI would genuinely love to hear your specific complaints about Go's syntax.
- dada216 1y agoanal_reactor started with "once I read on 4chan". that's all you should need to know to skip this entirely
- anal_reactor 1y agoMy first problem is "where the fuck is this function defined" and then "what is this type actually". Answering these two questions for random line in random code is surprisingly difficult.
- majewsky 1y ago> what is this type actually Do you mean that you don't know what type a certain variable has? If so, just add `theVariableName = false` and try to compile it (or just `go vet ./path/to/folder` from the repo root) and the error message will tell you the type. Same as with every other strongly typed language.
- alain_gilbert 1y agoOr if he was to use any kind of decent text editor, he could also just place his mouse over the variable and see the type it has. Then comes the hard part "where is it defined"... he could even press "command" and then click on it.
- dwb 1y agoReadability debates are usually boring because it’s so subjective, but in this case it’s just your (admitted!) unfamiliarity. Lots and lots of people would disagree with you that Go is unreadable. Go isn’t pretty or cute, but one of its strengths is its relative clarity. All languages require some familiarity to read properly.
- tete 1y ago> LookupMX and Resolver.LookupMX now return DNS names that look like valid IP address, as well as valid domain names. Previously if a name server returned an IP address as a DNS name, LookupMX would discard it, as required by the RFCs. However, name servers in practice do sometimes return IP addresses. Ah, intentionally making code not standards compliant.
- thiht 1y agoReality compliant > standards compliant.
- porridgeraisin 1y agoStandards are toilet paper in the general case. Only in the rare cases where reality matches it does it matter.Anyone can write anything on a piece of paper. What code is executing on the DNS server at the end of the day is what matters.
- deleted 1y ago[deleted]
- ptman 1y agoInteractive tour of new features: https://antonz.org/go-1-25/ https://antonz.org/go-1-25/
- truth_seeker 1y ago> TLS servers now prefer the highest supported protocol version, even if it isn’t the client’s most preferred protocol version. >Both TLS clients and servers are now stricter in following the specifications and in rejecting off-spec behavior. Connections with compliant peers should be unaffected. This is nice.
- nikolayasdf123 1y agohave been looking toward this release for quite some time!
- kristianp 1y agoI'd be interested to know more about the faster slices changes. Haven't been able to find anything published about it.