Get the latest tech news

Evolving the Go Standard Library with math/rand/v2


Go 1.23 adds math/rand/v2 and charts a course for the evolution of the Go standard library.

The algorithm is based on an idea by George Marsaglia, tweaked by Don Mitchell and Jim Reeds, and further customized by Ken Thompson for Plan 9 and then Go. From Go 1 through around Go 1.5, we went back and drew the “fully inked” version of each of these: we converted the compiler and runtime to Go; we wrote a new, precise, parallel, concurrent garbage collection with microsecond pause times; and we replaced standard library implementations with more sophisticated, optimized algorithms as needed. In practice, that means we take the existing package as the starting point and only make changes that are well motivated and provide a value that justifies the cost to users of updating.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of math

math

Photo of rand

rand

Photo of Standard Library

Standard Library

Related news:

News photo

I rewired my brain to become fluent in math (2014)

News photo

A National Security Insider Does the Math on the Dangers of AI

News photo

Fortran Standard Library: release v0.5.0