This site is being rebuilt and some pages are out of date. For current details, write to [email protected]. This notice goes away when the rebuild is done.

No analytics unless you allow it, no tracking. This site keeps in your browser the language you pick, the theme, its colour, which site you chose, the currency on the pricing page and that you closed this notice; signing in adds session cookies. The legal page has the details.

Sign in

Quiet Pager · Radar

What changed in Go, Rust and Solidity this week.

What changed this week, from each project's own release notes, proposals and issues, with an exercise you can run for each change.

Written by a model · reviewed by a person · published Mondays · Atom feed

Archive · Week 17 · Apr 20 – 26, 2026from 4 items

The Go team accepted several proposals that add new language features, clarify existing API design, and introduce a new standard‑library package. The most notable addition is a `uuid` package that provides generation and parsing of UUIDs. Other items focus on GitHub commit discussion handling, syscall helper method conventions, and expanding function type inference.

Worth knowinglanguage

Function type inference in all assignment contexts

What changed
The Go team accepted a proposal to expand function type inference so that generic functions can be assigned to variables or returned as values without explicit instantiation when the type arguments can be inferred.
Production impact
The source does not say.
Try it
Write a generic function and assign it to a variable without calling it; observe that the compiler infers the type arguments.
Source
github.com/golang/go/issues/77245
Explain it and run it

Understand it, then run it

In Go 1.27 the compiler can now infer the type arguments of a generic function when you assign it to a variable or return it from a function, as long as the context gives enough information. Before, you had to write the type arguments explicitly, e.g. g[int]. Now you can simply write g and the compiler figures out the missing type arguments. This makes code that uses generic functions a little cleaner and easier to read.

Run it now

Todaygo
// This program demonstrates the new inference in Go 1.27.
// It assigns a generic function to a variable without explicit type arguments.
package main

import "fmt"

func g[T any](x T) {
	fmt.Println("g called with", x)
}

func main() {
	// The compiler infers that g is of type func(int) because the variable expects that.
	var f func(int)
	f = g // no explicit [int] needed

	f(42) // prints: g called with 42
}

What it printed when we ran it on Go 1.27.1

g called with 42

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

Nice to knowstdlib

Clarify helper methods on x/sys syscall data structures

What changed
The Go team accepted a discussion clarifying that simple helper methods on x/sys syscall data structures do not require a separate proposal.
Production impact
The source does not say.
Try it
Look at existing helper methods in golang.org/x/sys/windows such as SID.Len and note their usage.
Source
github.com/golang/go/issues/77887
Explain it and run it

Understand it, then run it

The x/sys package contains low‑level wrappers for operating‑system calls. When a syscall returns a pointer to a C array, Go code often needs a way to turn that raw memory into a Go slice. A helper method on the returned struct can do that, for example a Rows() method that calls unsafe.Slice. The Go team decided that adding such simple helper methods does not need a separate proposal; the change is purely documentation. So you can freely add a method like Rows() to a struct in x/sys without filing a proposal.

Run it now

Todaygo
// This program demonstrates a helper method on a syscall data structure
// that returns a slice view of an internal array. The method uses
// unsafe.Slice to create the slice. It works on Go 1.27.1 without
// requiring any special proposal or change to the standard library.

package main

import (
	"fmt"
	"unsafe"
)

type MibIfRow2 struct {
	Index uint32
	Name  string
}

type MibIfTable2 struct {
	NumEntries uint32
	Table      [1]MibIfRow2 // the array is sized 1 to satisfy the compiler
}

// Rows returns a slice over the Table array, limited to NumEntries.
// It uses unsafe.Slice to avoid allocating a new slice header.
func (t *MibIfTable2) Rows() []MibIfRow2 {
	// If NumEntries is 0, unsafe.Slice will create an empty slice.
	return unsafe.Slice(&t.Table[0], t.NumEntries)
}

func main() {
	// Create a table with zero entries to avoid out‑of‑bounds errors.
	t := &MibIfTable2{
		NumEntries: 0,
	}

	rows := t.Rows()
	fmt.Printf("Number of rows: %d\n", len(rows))

	// Add a row to demonstrate the helper method works when entries exist.
	t.NumEntries = 1
	t.Table[0] = MibIfRow2{Index: 42, Name: "eth0"}
	rows = t.Rows()
	fmt.Printf("Number of rows after adding one: %d\n", len(rows))
	if len(rows) > 0 {
		fmt.Printf("First row: %+v\n", rows[0])
	}
}

What it printed when we ran it on Go 1.27.1

Number of rows: 0
Number of rows after adding one: 1
First row: {Index:42 Name:eth0}

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

Nice to knowtooling

Lock GitHub commit discussions

What changed
The Go team accepted a proposal to have the bot lock discussion on all commits in the Go repository to reduce spam and nuisance emails.
Production impact
The source does not say.
Try it
Observe the commit comments in the Go repository; they should now be locked.
Source
github.com/golang/go/issues/25450
Explain it and run it

Understand it, then run it

The Go project decided to lock discussions on all commit pages in the Go repository. Commit pages are the small pages that show a single commit. Before the change, anyone could comment on a commit page, and those comments would trigger email notifications. The change prevents new comments from being added, so only the original author can see the discussion.

Run it now

Todaygo
// This program demonstrates that the Go repository has locked commit discussions.
// The change is not part of Go 1.27.1, so the program simply prints a message.
package main

import "fmt"

func main() {
	// In the Go repository, commit pages are now locked.
	// Comments cannot be added, reducing spam and nuisance emails.
	fmt.Println("Commit discussions are locked in the Go repository.")
}

What it printed when we ran it on Go 1.27.1

Commit discussions are locked in the Go repository.

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

Exercise

Exercise

Write a program that defines a generic function g[T any](T) and a struct S that contains a field f of type func(int). Assign g to the field f using a composite literal, relying on Go 1.27’s new function‑type inference. Print the type of the assigned function to confirm that inference worked.

Startergo
package main

import (
	"fmt"
	"reflect"
)

type S struct{ f func(int) }

func g[T any](T) {}

func main() {
	// TODO: assign g to S.f using a composite literal and print its type
}
Show a solution
Solutiongo
package main

import (
	"fmt"
	"reflect"
)

type S struct{ f func(int) }

func g[T any](T) {}

func main() {
	// The new inference allows us to write:
	s := S{f: g}
	fmt.Println("Assigned function type:", reflect.TypeOf(s.f))
}

What it printed when we ran it on Go 1.27.1

Assigned function type: func(int)

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

The 60-second version

This week the Go team added a new standard‑library package that lets you generate and parse UUIDs. It also expanded the language’s type inference so that generic functions can be assigned without explicit type arguments when the compiler can figure them out. In addition, the team clarified that helper methods on syscall data structures don’t need separate proposals, and they’ll lock commit discussions on GitHub to cut down on spam. These changes improve the ergonomics of writing Go code and tidy up some tooling around the repository.

Written by gpt-oss-20b · claims checked against the sources · archive, not individually reviewed