Not mentioned: Floating-point parsing and formatting now uses Russ Cox's uscale algorithm.<p><a href="https://research.swtch.com/fp" rel="nofollow">https://research.swtch.com/fp</a><p><a href="https://github.com/golang/go/blob/go1.27.0/src/internal/strconv/uscale.go" rel="nofollow">https://github.com/golang/go/blob/go1.27.0/src/internal/strc...</a>
I’m so happy Russ still contributes even though he isn’t lead anymore. I always enjoy reading his blog posts
I seriously wonder why this isn't mentioned in release notes.
I’d love to see how that compares to zmij: <a href="https://github.com/dtolnay/dtoa-benchmark" rel="nofollow">https://github.com/dtolnay/dtoa-benchmark</a>
The upstream fmtlib dtoa-benchmark integrates uscale (<a href="https://fmtlib.github.io/dtoa-benchmark/results/" rel="nofollow">https://fmtlib.github.io/dtoa-benchmark/results/</a>). It uses C code from Russ Cox's original fpfmt repository (<a href="https://github.com/rsc/fpfmt/tree/main/bench/uscalec" rel="nofollow">https://github.com/rsc/fpfmt/tree/main/bench/uscalec</a>), which is slightly different from the Go code upthread.<p>Zmij and xjb are in a league of their own. Broadly speaking, dtoa first has to find the shortest decimal representation of the floating-point input, and then format that decimal representation into a string. Zmij and xjb pull far ahead of the others mostly by speeding up the second part of that process.<p>uscale is quite good without the stringification, as are many other algorithms. I would say uscale's main strength isn't its speed, but rather its simplicity and, more importantly, the fact that it does both formatting and parsing using a single ~11 KiB table, which no other state-of-the-art algorithm offers (although yy comes close).
See also this recent (Aug 6th) interview of Russ Cox:<p><a href="https://www.acm.org/articles/people-of-acm/2026/russ-cox" rel="nofollow">https://www.acm.org/articles/people-of-acm/2026/russ-cox</a><p><a href="https://news.ycombinator.com/item?id=49327408">https://news.ycombinator.com/item?id=49327408</a>
I love how proactive the crypto team is about post quantum. They released <a href="https://pkg.go.dev/crypto/mldsa" rel="nofollow">https://pkg.go.dev/crypto/mldsa</a>. The lead maintainer Filippo Valsorda wrote a nice piece here[1] to urge the tech world to start deploying good enough versions of post quantum crypto.<p>[1] <a href="https://words.filippo.io/crqc-timeline/" rel="nofollow">https://words.filippo.io/crqc-timeline/</a>
While I'm highly sympathetic to competing priorities crowding out movement to pq cryptography. At the same time it's not sudden at all. It's been 10 years since nist first said "move shit over"?
Yes, and at that time the answer was "move over where?" now it's 2026 and x-wing is a draft still
Yeah the deadline to move everything is drawing near I am actually not impressed by how fast things are going but all progress is good.
its ok we are still rawdogging ftp every day in the business world. The fax machines of the future truly
The .NET team have been similarly busy on post-quantum lately, it completely dominated the .NET API reviews for the dotnet 11 release.<p>It seems there's a big push happening behind the scenes.
And Java implementations as well.
US Government is starting to push hard so code first needs to support it.
Ok, but when is it coming to our web browsers and email clients?
I don't know about mail clients, but it's in most web browsers already.
It’s been on by default for 2 years in Chrome.
This person was public on the recent nist list <i>against</i> hybrid solutions. I simply don't understand why they would oppose the safer option. Yes I've read the mailing list, it just all seems quite suspicious.
Brace for a wave of drive-by pull-requests swapping google/uuid [1] out for the now-standard uuid package [2].<p>Kubernetes project will be the first one [3] I guarantee it.<p>[1] <a href="https://pkg.go.dev/github.com/google/uuid" rel="nofollow">https://pkg.go.dev/github.com/google/uuid</a><p>[2] <a href="https://go.dev/pkg/uuid" rel="nofollow">https://go.dev/pkg/uuid</a><p>[3] <a href="https://github.com/kubernetes/kubernetes/blob/2220c3853a2402ffc0502995c49b383f84ae8ceb/go.mod#L36" rel="nofollow">https://github.com/kubernetes/kubernetes/blob/2220c3853a2402...</a><p>[4] <a href="https://github.com/google/uuid/issues/221" rel="nofollow">https://github.com/google/uuid/issues/221</a>
Unfortunately for people SELECTing UUIDs out of a DB directly into a uuid struct, the built-in uuid structs don't implement the necessary interface for that, so you'll have to continue using the google package, or a plain string.
The database/sql package gained native support[1] for the uuid.UUID type so it will Just Work even without the methods. This probably should have been mentioned in the release notes and database/sql package docs.<p>[1] <a href="https://cs.opensource.google/go/go/+/refs/tags/go1.27.0:src/database/sql/convert.go;l=270-280" rel="nofollow">https://cs.opensource.google/go/go/+/refs/tags/go1.27.0:src/...</a>
uuid.UUID is implemented as [16]byte, like most other UUID implementations out there.<p>If you want to keep your package implementation agnostic, use [16]byte as argument type; that's assignment-compatible with any other type that is such an array underneath:<p>For an example, see the UUID logging of golog:
<a href="https://pkg.go.dev/github.com/domonda/golog#Message.UUID" rel="nofollow">https://pkg.go.dev/github.com/domonda/golog#Message.UUID</a>
Or just a number (128-bit).
Oooof… well played go team, well played.
will 'go fix' take care of this?
Go 1.27 interactive tour:
<a href="https://victoriametrics.com/blog/go-1-27/" rel="nofollow">https://victoriametrics.com/blog/go-1-27/</a>
Struct literal changes while welcomed, have the issue of being a possible source of bugs, if there are overlapping fields,<p>type Habitat struct {
Burrow string
}<p>type Gopher struct {
Name string
Burrow string
Habitat
}<p>It will not initialise what one expects, here it is a contrived example, however it may not be easy to spot in more complex source code.<p><a href="https://go.dev/play/p/dsY6tK5S8Ie" rel="nofollow">https://go.dev/play/p/dsY6tK5S8Ie</a><p>Better generics and improved SIMD are nice additions as well.
Go has had this behaviour for promoting fields (<i>provided they don't clash</i>) for some time, this is just extending the language feature to initialisers.<p>Your contrived example doesn't initialise the embedded struct that also contains a "Burrow" field. If it did that at all, even without naming the Burrow field... you would not be allowed to initialise the struct, because of the ambiguity.<p><a href="https://go.dev/ref/spec#Composite_literals" rel="nofollow">https://go.dev/ref/spec#Composite_literals</a><p>> A key must not denote a promoted field inside an embedded struct if that struct is also specified by another key.<p>> Given the declarations<p><pre><code> type Object struct { name, color string }
type Point3D struct { Object; x, y, z float64 }
type Line struct { Object; p, q Point3D }
</code></pre>
> .... field selectors may not denote overlapping fields:<p><pre><code> obj := Object{"edge", "black"}
line3 := Line{Object: obj, name: "diagonal"} // invalid: name denotes a field inside Object</code></pre>
Which error?<p><a href="https://go.dev/play/p/CFWVXkFBOEX" rel="nofollow">https://go.dev/play/p/CFWVXkFBOEX</a><p>Note that I added a name field to Line.<p><pre><code> Data: {edge black} -- {{edge black} {{ } 0 0 0} {{ } 0 0 0} diagonal}
</code></pre>
Oops now Object.name is empty, which is my point.
<p><pre><code> ./prog.go:20:29: cannot specify promoted field name and enclosing embedded field Object
</code></pre>
Which is what you get if you <i>don't</i> add a direct "name" field to Line, because it's then completely unambiguous, the deeper "name"s are not promotable.
Yeah, but that isn't what I am talking about.<p>The whole point is the implicit bug, when the field is added and initialisation code rewritten to take advantage of this feature, without the developer realising the clash in first place.
I'm not sure what I can say. One man's "source of bugs" is another man's "convenient syntax".<p>The rule errs in <i>favour</i> of the developer and the struct they can see. Initialising (or accessing!) a named field <i>always</i> picks the one in the top-level struct if you have one there. It'll be there because you added it. Promoted fields can only get promoted if they are unambiguous.<p>If <i>you</i> don't want to take advantage of that, <i>you</i> can write in full:<p><pre><code> g := Gopher{
Name: "Gopher",
Burrow: "Burrow #42",
Habitat: Habitat{Burrow: "Wild Acres"},
}
fmt.Println("Your burrow: ", g.Burrow)
fmt.Println("I mean your _real_ burrow: ", g.Habitat.Burrow)
</code></pre>
... but most Go programmers would look at the fact you named two fields the same and then nested them as an unforced error, a rookie mistake.<p>Most of them are very happy that they can embed some other type they don't know the full contents of, knowing they can access (and now initialise!) fields in it they <i>care</i> about, and thus don't give the fields in their own types the same name, while resting assured that if that other type later gains new fields they've never heard of, it's not going to clash with their own naming choices and break their code and force them to rename something. <i>Their</i> types' field names always come out on top, in their code.<p>You're doing "but what if I <i>deliberately</i> named my type's fields the same as the embedded type's fields?", which is like "but what if I <i>deliberately</i> stuck my hand in the meat grinder?" -- <i>don't do that</i>
The only, single, complaint is that this possible source of bugs should be part of go vet, just like in other programming languages static analysis tooling, Sonar, PVS, clang-tidy, Roslyn, Checkstyle, clippy, PMD,.... catch such kind of flaws.<p>However I see that I crash again in the Go versus other programming languages ecosystems mindset.
You, or $YOU, could add that as a linter and integrate it into golangci-lint [1]. There are many things in golangci-lint that I abhor and can't even imagine turning on, things that default to false that I can't imagine working without, and some things I think just bizarre... and everyone will have their own distinct list of such things. While one can argue about the virtues of things being in linters versus in the language I do think it's a useful way to resolve these sorts of issues without having to litigate the compiler itself. If I were ever to build my own language it would ship with an equivalent of golangci-lint and its open-source ethos of linting from day one.<p>In the before times this would be not very helpful but in 2026 this is probably about 30 minutes of your actual time and maybe a couple of hours of AI time. The code isn't too hard to write but there are a number of edge cases to cover, as there always is in this sort of thing.<p>[1]: <a href="https://golangci-lint.run/docs/plugins/module-plugins/" rel="nofollow">https://golangci-lint.run/docs/plugins/module-plugins/</a>
I've missed something - what were you expecting from that code? Would anyone expect the `Burrow` inside the `Habitat` to be initialised instead of the top-level `Burrow`?
I'd say it is as expected
<a href="https://go.dev/play/p/sy6SMrOiw4y" rel="nofollow">https://go.dev/play/p/sy6SMrOiw4y</a>
Mhm, probably worth a golang-ci check for duplicate field names which are accessed by methods on the embedded type.
> First, generic methods are now supported
> Generic functions can now be used without explicit type arguments<p>Great! This was an ergonomic code issue I hit when trying to create a universal handler/controller generic that could hydrate/populate function arguments (from a request body) without having an actual copy of the arguments: <a href="https://github.com/xeoncross/mid/blob/main/handler.go#L12" rel="nofollow">https://github.com/xeoncross/mid/blob/main/handler.go#L12</a>
I love these release notes but I <i>really</i> wish they would add syntax highlighting to the Go blog. I'm always a little bit surprised/disappointed whenever I land on a go.dev link since I know the code will be just a little harder to visually parse than it needs to be.
There's a reason for this. Rob Pike was asked about it and said that syntax highlighting reminds him of the bright colors of children's toys and he personally disables it so that he can focus on the text.<p>I don't know why it's <i>still</i> like that but that's the original reasoning.
> Syntax highlighting is juvenile. When I was a child, I was taught
arithmetic using colored rods
(<a href="http://en.wikipedia.org/wiki/Cuisenaire_rods" rel="nofollow">http://en.wikipedia.org/wiki/Cuisenaire_rods</a>). I grew up and today I
use monochromatic numerals.<p><a href="https://groups.google.com/g/golang-nuts/c/hJHCAaiL0so/m/kG3BHV6QFfIJ" rel="nofollow">https://groups.google.com/g/golang-nuts/c/hJHCAaiL0so/m/kG3B...</a>
Wow, that thread is a piece of work<p>> Gofmt was written to reduce the number of pointless discussions about code formatting. It succeeded admirably. I'm sad to say it had no effect whatsoever on the number of pointless discussions about syntax highlighting, or as I prefer to call it, spitzensparken blinkelichtzen.<p>> When I was a child, I used to speak like a child, think like a child, reason like a child; when I became a man, I did away with childish things.<p>I sincerely hope Rob Pike was being sarcastic/ironic, because otherwise, he sounds insufferable
> because otherwise, he sounds insufferable<p>Oh come on, I like syntax highlights, but this is not "insufferable". It's just opinions expressed strongly, with probably some tounge-in-cheek
He sounds insufferable because he's calling syntax highlighting childish. Not simply politely saying it's not his thing. It's like he can't understand why anyone else would use it, or isn't bothering to. Maybe there's more nuance to what he said, but it's not obvious from the quote.
he is insufferable. it's his thing lol.
That must be why traffic lights and electrical wires and transit maps are all black and white...
That’s an interesting point.<p>The reason traffic lights are colored is because they are showing distinct states of the same thing and the color is the means of differentiating.<p>Same for transit maps: different routes are colored to distinguish them from other routes, which is especially useful if they overlap.<p>But that’s not what syntax highlighting does.<p>The equivalent of your examples would be to not highlight the syntax at all, but only use color coding to distinguish variables.<p>The equivalent of how syntax highlighting currently works for your examples would be if the light fixture was one color, and the light pole was another, but then all the actual lights were the same color.<p>I actually think highlighting only the variables with distinct colors could be extremely valuable. Would certainly help avoid mistakes with nested i/j loop counters.<p>Edit to add: come to think of it, it would have been even more valuable in Go, until recently anyway. The variable color coding would expose the common loop variable instance bugs, because a programmer would be instantly puzzled by the unexpected coloring.
> The reason traffic lights are colored is because they are showing distinct states of the same thing and the color is the means of differentiating<p>I wonder if traffic lights were invented today, would it be just one light changing colour?
Your comment makes me think of LabVIEW - if you're not familiar with it, it uses a visual programming language ("G") in which data flows down wires. The color of the wire indicates the wire's data type (blue for ints, orange for floats, green for bools, pink for strings) and the width of the wire indicates the dimensionality of the data (thin line = scalar, thick line = 1D array, double-thick = 2D array). The color is more than decorative or even assistive - it's essential to understanding the program.
I still wonder why every open-source visual programming language is either a toy for teaching or straight up awful, often not implementing but even loops, when LabVIEW has been doing it right for decades.<p>Despite its huge size and it installing several services that constantly run in the background, it's still one of my favorite "languages" of all time. It's the only one I've ever seen people going from never having programmed before to making simple but meaningful contributions in within a single day.
That does exist, it's called semantic highlighting.<p>In any case, my analogy was not perfect, but neither was Russ's! The point is it's totally normal and not "childish" to use colours to help distinguish things. Traffic lights do not technically need colours (you can use the position of the lights - I assume that's what badly colourblind people do). Nor do transit maps technically need colours - you could just label the lines, or use patterns.<p><a href="https://www.flickr.com/photos/gywst/1407078279" rel="nofollow">https://www.flickr.com/photos/gywst/1407078279</a><p>It's completely absurd to say that colours are childish because they can help children.
There are a bunch of identical things on my screen called lines. They contain a bunch of mostly identical things called tokens. Syntax highlighting uses different colors to identify the different purposes of all of these
tokens blasted onto my screen.
I want to downvote this for being one of the stupidest things I've read this week but you're just quoting it so I guess I'll just seethe silently.
What is childish is holding up one guy's editor preferences as a religious sacrament when 99.9% of your readers have different preferences.
That makes sense as a personal preference for him, but it's odd for that to still be the company/project stance. Like, surely he knows he's the minority for not wanting highlighting?
that's an extremely odd explanation and it makes me think that he has some hidden PTSD. it's also insane that one person's preference trumps the rest of the world's.
I understand and respect this position. I think syntax highlighting
is a highly subjective matter, bordering on personal preference with regard to shell interactions, editor configurations, bindings, shortcuts, snippets, and the like. It's also... insignificant somehow, like quibbles over formatting rules that Go settled once and for all with `go fmt`.<p>I often prefer not to enable syntax highlighting just for color. Occasionally I'd choose some minimal theme that only highlights string literals and keywords. So it has two or three colors. But some of the color schemes I see are a festival of lights where every special element of syntax has its own color.
I don't understand how that is supposed to help me parse anything and why the rules are complex. The `range` keyword needs to be purple, and `chan` must be navy blue. Why exactly? And every site has a different color scheme? There is no consensus, and there shouldn't be.<p>For a serious community-driven project like Go, dealing with the question of syntax highlighting is strange. The creators deliberately avoided the questions of IDEs and editors for Go, leaving them to the community. I think the same principle applies here.
> The creators deliberately avoided the questions of IDEs and editors for Go, leaving them to the community. I think the same principle applies here.<p>Exactly. This is fundamentally about accessibility (in the broadest sense). Do people have opinionated screenreader settings they like to force on others too?
I get the why, kind of - if you need colors to make sense of code, maybe the code isn't clear enough. If you send blobs of code through email and other systems that don't necessarily have syntax highlighting, it also makes sense. But on a website, whyever not?<p>Personally I can't say when I was last actually aware of syntax highlighting. The only time I'm actively engaged with it is to change the default low contrast comment color that a lot of themes have (for some reason, as if comments are unimportant / noise) to something better. For Go, I don't really notice when it has or doesn't have syntax highlighting, at least not on e.g. go's website.
The Go official web site doesn't even use the Go fonts:
<a href="https://go.dev/blog/go-fonts" rel="nofollow">https://go.dev/blog/go-fonts</a><p>I wonder if the Go fonts has been created just to get a trademark on the "Go" word...
The Go language is by itself more than enough to get a trademark. They only additional thing you can do with a font is get a design patent... <i>for the font</i>.<p>It's more likely that they don't feel the need to use the font they gave you (for your code editor) on code samples on their own web pages. As it's a custom font, the text would be susceptible to pop-in, or would visibly switch from one font to another, both of which are ugly.<p>Their CSS says this:<p><pre><code> #blog .Article[data-slug='/blog/go-fonts'] code {
font-family: 'Go Mono', monospace;
}
#blog pre,
#blog code {
font-family: monospace;
}
</code></pre>
So they have no specific font preference for code samples, they only show their Go-specific font <i>on the blog post about it</i>. They prefer fast loading and no jank over custom font.<p>EDIT: just force reload <a href="https://go.dev/blog/go-fonts" rel="nofollow">https://go.dev/blog/go-fonts</a> and look at the first hyperlink, "golang.org/x/exp/shiny". Watch it visibly switch from generic monospace font to Go Mono as the page loads. Janky! They probably don't want that for all their code samples ever.
When I started learning Go I went all in including using the recommended editor (acme editor) which has no syntax highlighting, no autocomplete and a very different way of writing code. My production went down a lot but the quality of the code went up a lot.<p>I think the lack of syntax highlighting was one reason for that. It makes you think more about the code you write and how it should compose, while a fully fledged IDE encourages you to just throw more code at the problem.<p>I think the ACME way should be used for love of code and ideally when you want to create libraries that stand the test of time.
When you just want to get things done fast bring the full IDE and now some LLM vibes and it’s done.
I go through intervals of turning autocomplete on and off. I think autocomplete is useful for boilerplate (similarly LLMs are useful for boilerplate), but I prefer not to use either when writing code where correctness is particularly important. This is because it’s easier for me to internalize what something is doing by typing it out. It’s actually more effort for me to understand code by reading it rather than writing it.<p>I experience something similar with system design, where the act of creating a diagram helps me to understand much faster than trying to read someone else’s diagram. It’s not because only I can create good diagrams (I cannot) but again because the act of creating one helps me internalize the design.
Are you using the Go fonts?<p><a href="https://go.dev/blog/go-fonts" rel="nofollow">https://go.dev/blog/go-fonts</a>
I just have a tampermonkey profile for go.dev to fix that for me.
> Second, a key in a struct literal may now be any valid field selector for the struct type, allowing fields in nested or embedded structs to be initialized directly<p>It's been a while since I've written more than anything trivial in golang, but this seems like a big deal to me. As in, I can define a struct that is consistent and reusable in other structs
This will shorten many test files!
This is quite a QoL issue, but is it big? Nothing changes from functional point of view.
This makes me want to find a side project for an excuse to give Go another try (I last used it professionally pre-generics).<p>I do still wish it had discriminated unions (algebraic data types) and some better error handling ergonomics.
Re unions:<p><a href="https://github.com/golang/go/issues/76920" rel="nofollow">https://github.com/golang/go/issues/76920</a><p>You might want to follow this proposal, if you aren't already. It's the most recent one, and it's supported by quite a few “core members” of the Go Team. I don't think it'll land in 1.28, but I like the fact that it's still a feature that's being actively discussed.
Having worked a couple of greenfield go shops post generics, it’s still quite rare to find them in first party code. They’re just not that useful outside of library APIs. Proper algebraic data types would be a huge game changer.
Do it. It is just a beautiful language to write and much simpler to pickup than many others. I am a fan boy of course but I love Go.
Go is extremely easy to pickup. If you know any language you probably know Go already for the most part (channels notwithstanding).<p>I wouldn't say it is a "beautiful" language however. Though that is in the eye of the beholder, I don't think the Go designers were even really going for beauty.
Tagged unions can be implemented in user code, you dont actually need language support to use them.<p><a href="https://github.com/splizard/tagged" rel="nofollow">https://github.com/splizard/tagged</a>
This is only a small piece of the story for what people say when they want tagged unions. Without all of the ancillary support in the language, like exhaustive pattern matching, it really doesn't count.
The C++ committee said the same thing, and gave us std::variant. They are painful to work with and do not really deliver most of the benefits people want.
That is a LOT of code (very ugly code, I would add) that could be replaced by `type Float = float32 | float64` in a language with actual support for union types.
Tagged unions are not union types. A union type is a supertype for any arbitrary collection of types, but a tagged union aka sum type is a single type with multiple data constructors, and does not require subtyping to be implemented.
The SIMD stuff is incredible. I have been having lots of fun with it. You can use LLMs as a scalar to SIMD transpiler, it works amazingly well.<p>Sure a SIMD expert writing assembly can probably do a better job than an LLM using these new intrinsics, but it’s still massively faster.
I still believe that SIMD support is one of the most underrated new features in Go.<p>It's relatively straightforward to read and to write code using Go's SIMD package (the caveat being that you have to convert your data to SoA manually), and it gives comparable performance to other languages, since there's little in the way of GC overhead, bounds checking, etc, in this case.<p>So SIMD not only increases performance on its own, but it also closes the performance gap between Go and C++ / Rust, which has been a major cause for rewrites in the past. The memory usage overhead due to GC doesn't go anywhere of course, so there are still performance reasons to "Rewrite in Rust", but it's now become much easier to just optimise the hell out of Go code instead.
Odin solves this by letting you declare all arrays as either normal (AoS) or SoA, which helps with this use case a lot. Otherwise very similar ideas, except all the memory goodies. Underrated language!
Are rewrites from Go to Rust for performance reasons really that common?
Hard to say tbh, but there are some high-profile examples, e.g. from Discord: <a href="https://discord.com/blog/why-discord-is-switching-from-go-to-rust" rel="nofollow">https://discord.com/blog/why-discord-is-switching-from-go-to...</a>
Agreed. I've recently translated a pangram generator project written in Rust [1] leveraging SIMD to do the same in Go [2] to see how it fairs in terms of speed - the results are pretty close. In my local machine I'm getting ~3GHz in Rust vs ~2.4GHz in Go, which I think is really impressive.<p>[1]: <a href="https://github.com/tuzz/pangram-machine" rel="nofollow">https://github.com/tuzz/pangram-machine</a><p>[2]: <a href="https://github.com/nkanaev/pangram-machine-go" rel="nofollow">https://github.com/nkanaev/pangram-machine-go</a>
“Do a breakthrough and make this SIMD fastest”
I'm so glad the new uuid package landed - it's overdue but a very welcome addition! I've already replaced github.com/google/uuid with `uuid` in several projects
Used to code primarily in Java. Now my app stack is about 80% Go. I love that it enables lightweight application development. Glad to see the platform evolving with a focus on resource efficiency.
Every release CPU load becomes a bit lower. Love it :)
Full release notes: <a href="https://go.dev/doc/go1.27" rel="nofollow">https://go.dev/doc/go1.27</a>
FYI golangci-lint and gopls are both broken if you try using generic methods.
Broken how? Please report an issue. The latest gopls should support generic methods.
I’ve been able to run golangci-lint locally just fine.<p>However I’ve not had much success running it on CI, with at least the 1.27rcs. I encountered some panic deep within staticcheck, and ended up turning off that specific linter on CI (better than not running it at all).<p>There was a tracking issue for go1.27 support at [1].
However that is now closed, which might imply that it should be working.<p>[1] <a href="https://github.com/golangci/golangci-lint/issues/6643" rel="nofollow">https://github.com/golangci/golangci-lint/issues/6643</a>
Thank you for the headsup!
Interesting, this reduced memory usage in my test down from 14 MB to 12 MB, and Bun (Rust) is still at 7.2 MB, down from 10 MB with Bun (Zig).
New JSON is amazing, and SIMD will be big for json, audio/video etc.
Nice additions to go.<p>I like to imagine that one day we'll have a language that launched with all the features languages eventually add. The whole ecosystem of packages would be built on them instead of a legacy of more primitive language feature sets.
I don’t think launching Go today would have been better than 15 years ago.<p>Standard ML is a perfect programming language from the 90s. It unfortunately does not have a great eco system of packages.
Obligatory XKCD reference:<p><a href="https://xkcd.com/927/" rel="nofollow">https://xkcd.com/927/</a>
Generic methods are a huge win for the language. I've been waiting on these kinds of improvements to the type system before resuming work on my database toolkit.
I know this is an extremely unwelcome comment but I just have to ask… have you considered rust? Especially for a DB.<p>I just had excellent success migrating a go code base to rust completely AI driven. It led to a healthy performance boost too, as now I don’t need to worry about GC pressure contortions.
Ecosystem is my primary concern when it comes to language choice and I'm not worried about speed differences between Go and Rust. Unfortunately, Python is probably still the most practical choice for backend/pipeline engineering at the moment. That does mean there are Rust libraries being used indirectly though.
> Generic methods are a huge win for the language. I've been waiting on these kinds of improvements to the type system ...<p>It's funny that you and many others have found the introduction of "generics" in Go to be highly valuable, considering one of the motivations for Go's existence was:<p><pre><code> Its designers were primarily motivated by their shared dislike of C++[0]
</code></pre>
One of the language features C++ provides, "templates", was <i>explicitly</i> rejected by the language authors as being antithetical to Go philosophy[1]. Thompson put it bluntly:<p><pre><code> DDJ: In the presentation before the awarding of the Japan
Prize today, you were quoted on the distinction between
reasearch and development. [The former, Thompson stated,
was directionless, whereas development had a specific goal
in mind.] So in that context, is Go experimental?
KT: Yes. When the three of us [Thompson, Rob Pike, and
Robert Griesemer] got started, it was pure research. The
three of us got together and decided that we hated C++.
[laughter] [2]
</code></pre>
And now, years later, generics are "a huge win."<p>0 - <a href="https://en.wikipedia.org/wiki/Go_(programming_language)#History" rel="nofollow">https://en.wikipedia.org/wiki/Go_(programming_language)#Hist...</a><p>1 - <a href="https://commandcenter.blogspot.com/2012/06/less-is-exponentially-more.html" rel="nofollow">https://commandcenter.blogspot.com/2012/06/less-is-exponenti...</a><p>2 - <a href="https://web.archive.org/web/20110521080746/http://drdobbs.com/open-source/229502480" rel="nofollow">https://web.archive.org/web/20110521080746/http://drdobbs.co...</a>
I have been waiting for generic methods and can't wait to use them!<p>The `go fix` modernisers are also great, have already run them in several repos.
I have recently been spending time learning go, really really liking the language, awesome standard lib, excellent tooling and great experience.<p>It sounds like the dumbest thing in the world, but I love the import system auto-adding stuff inside of vscode when I need it. just slick.
Generic methods finally landing is huge. Having to write a separate typed method for every integer type was one of the most annoying boilerplate patterns in Go.
I love Go because even minor versions deliver great value like this. The struct literal inits and generic methods are great conveniences to clean up clumsy boilerplate.<p>Not to mention it’s just a dream language to work with , especially when building concurrent applications. I love engaging all of my cores. And memory is so expensive nowadays
Minor versions are basically major versions for Go. They’ll “never” create a Go v2 because they prioritise maintaining backwards compatibility as a language feature, thus following semver rules, no majors.
true that, but we get a couple of these a year it seems, so their overall velocity is excellent, and without breaking anything. a dream language.
Go - the language no one likes, but frankly everyone needs.
idk, hn is the only place I every see people actually not liking go and most times those are people who's job is just far away from fields go is being use in.
I love Go and would not enjoy working with any other language as much
Python is already the language everyone needs.
Some people do like it though
Quarterly reminder that Go still exists.
[dead]
[dead]
[dead]
[dead]
[dead]
[flagged]
Being on the HN's homepage isn't as simple as "most upvoted articles in last X hours". They take into account upvote velocity: 40 upvotes in 40 minutes isn't the same as 40 upvotes in 4 yours.
Would you rather have yet another LLM-generated slop article in its place instead of an article covering a major release for a widely-used language? Out of all the articles that reach the HN front page, this is the one you have a problem with?
Wait generics? What changed? Why is golang accepting of generics now?
They landed half a decade ago...
There are some details here about the history of how generics finally came to Go: <a href="https://golang.design/under-the-hood/en/part2lang/ch08generics/history/" rel="nofollow">https://golang.design/under-the-hood/en/part2lang/ch08generi...</a><p>The tl;dr boils down to a combination of valuing both compilation speed and execution speed.
does it have goroutine termination, i recently found out you need a runtime patch for it
Terminated from the outside? No. The only way is to have a communication channel or a context that can be canceled and a proper handling of these.
The rule is to start a goroutine only if you know how it will end.<p>A goroutine that has to be killed (no other way to tell it to stop) is a bug.
What exactly do you mean by "goroutine termination"?
I'm always amazed on how the Go team has bo faith in syntax highlighting.
I really want to like Go, but I can't stand looking at Go code. The error handling is such a turn off.
This was my original take when I learned the language, but I later realised “errors as values” is one of the strengths of the language.<p>I have run both Go and Python backends in production for years. There is an entire class of bugs present in Python services (missing error handling) that simply does not happen in my Go services.<p>Python puts the burden of knowing what exception types a function call will raise on the caller, in Go I just check for err. Even if I do not anticipate every failure mode the Go call will raise, I will always log the error and handle it in a controlled manner. I couldn’t count the number of times I’ve encountered an unhandled exception in my Python code, and often in such a case the logging will be lacklustre because you will just see a huge stack trace, but lose the contextual logging I would have automatically added in Go.<p>Perhaps a syntactic sugar is in order to reduce verbosity.
Why would you say something so controversial yet so brave?
Not that I like go at all but because of it my C++ is starting to look like it as I am returning tuples of [result, error].<p>I try to avoid exceptions, is there any better ways? (Variant looks a bit more complicated but could be a totally OK alternative)
C++23 introduces std::expected, which is a simpler alternative to std::variant designed specifically for the result-or-error use case. You still don't get pattern matching, but Go-style tuples don't give you that either.
its simple and it works
Personally I feel go has many issues and is ugly as hell but the error handling is really the least of my worries.
Wasn't Go supposed to be "simple"? I remember how Go advocates used to boast about not having generics and now it almost seems like Go is trying to become some sort of C# or Java Frankenstein. I'm not even trying to badmouth Golang - just legitimately confused.
> <i>almost seems like Go is trying to become some sort of C# or Java Frankenstein</i><p>The original Go team was trying to avoid this:<p>"Java, JavaScript (ECMAScript), Typescript, C#, C++, Hack (PHP), and more [...] actively borrow features from one another. They are converging into a single huge language." [0]<p>That team has since moved on, and now Go has begun to join that convergence.<p>The problem is that most programmers seem to want to write Java, more-or-less. New, simpler languages come along, but once they get popular, the pressure is on to turn them into Java-likes. It happened to Python and now it’s happening to Go. It takes a strong will for language maintainers to say “no”, and their language will suffer in popularity as a result - see, for example, Ruby.<p>[0] <a href="https://go.dev/talks/2015/simplicity-is-complicated.slide#5" rel="nofollow">https://go.dev/talks/2015/simplicity-is-complicated.slide#5</a>
I would argue that languages like Java (C#, Kotlin, etc.) strike a very good compromise between modeling ability and comprehension, which is why they are popular and people gravitate toward them.<p>You can have more complex languages like Scala that provide stronger modeling ability, but at the cost of complexity. Golang started off as extremely naive/simplistic, and is now converging in some ways. But it still has a ways to go: no generics on interfaces, no unions/ADTs, no pattern matching, no proper enums, error handling leaves much to be desired, and much more.
I'm pretty sure there is a silent majority of Go users who don't want/need/know about generics.
A problem was so many others were screaming about the lack of generics, as though there were not other language options that provided them.
Go genetics are still incredibly simple compared to languages with a rich type system.
As I've always said: every non-functional programming language, as it matures, it's adoption rises in enterprise, eventually starts to become more and more like Java in terms of it's syntax and feature-set.