Go 1.26 Interactive Tour
88 points
10 hours ago
| 9 comments
| antonz.org
| HN
guessmyname
7 hours ago
[-]
> Optimized fmt.Errorf — With the new Go release, this debate should finally be settled. For unformatted strings, fmt.Errorf now allocates less and generally matches the allocations for errors.New. Specifically, fmt.Errorf goes from 2 allocations to 0 allocations for a non-escaping error, and from 2 allocations to 1 allocation for an escaping error […]

Thank you so much!!! I used to always take an extra second to decide which one to use based on the function’s parameter(s), and now I feel like I’m getting that time back, no sarcasm at all. This is a genuinely great improvement.

reply
rockwotj
8 hours ago
[-]
With the new GC I really love the trend of understanding memory bandwidth is the bottleneck for many things and the combination of locality and SIMD is a big performance unlock.

Reminds me of the WAND vs MAXSCORE discussion by turbopuffer: https://turbopuffer.com/blog/fts-v2-maxscore

reply
ShayNehmad
7 hours ago
[-]
Anton's interactive tour is the best way to read the release notes IMO! As mentioned on Cup o' Go.
reply
metaltyphoon
5 hours ago
[-]
Cup ‘o Go? The name is familiar. If yes, love the show and listen to every episode even though I rarely use Go!
reply
throwawaygod
4 hours ago
[-]
The differences btwn new() and make() is even lesser now. Is the goal is to deprecate make()?
reply
ptman
1 hour ago
[-]
How would you dup := make([]int, 0, len(slice)) then?
reply
dmix
8 hours ago
[-]
I don't use Go often but that's an excellent summary article.
reply
slantedview
7 hours ago
[-]
The recursive type constraints are excellent.
reply
SSchick
8 hours ago
[-]
Fed *bool `json:"is_fed"` // you can never be sure

felt that part

reply
XorNot
6 hours ago
[-]
Oh wow the changes to new() are an enormous ergonomics unlock. ErrAsType will also replace a similar package for me (too bad value errors will still be a thing though, and beginning new type errors still so wordy).
reply
binary132
6 hours ago
[-]
Wow, big release. I wonder if it was AI facilitated?
reply