Contents

341 Articles
14 Comments

Search

6 days Ago

The Go programming language takes its sweet time

Published by marco on

The Go 1.27 interactive tour by Jesús Espino (Victoria Metrics) describes an improvement in the language that allows methods to declare type parameters.

“This is the headline of the release. A method declaration may now declare its own type parameters, independent of the receiver’s. Before Go 1.27, only top-level functions could be generic, so a generic operation on a type had to live as a package-level function instead of a method.”

The following example shows a findIndex implementation that expects only that the type of the... [More]