Get the App
SLTechnology News&Howtos  ›  IT Information  › 

Google releases programming language Go version 1.21: cancels support for Microsoft Win7/8 and Apple macOS 10.13Universe 10.14

Shulou Source: shulou.com Published: 2023-11-24 18:40:53 11月17日 Update

CTOnews.com, August 10 (Xinhua)-- Google today released a new version 1.21 for the programming language Go. Most of the changes focus on the implementation of tool chains, runtimes and libraries. Google has previously said that the Go language will remove support for older Microsoft Windows and Apple macOS systems in version 1.21.

▲ Google programming language Go version 1.21 release log CTOnews.com with Go 1.21 main updates are as follows:

The improved toolchain profile guided optimization (PGO) function has officially entered the stabilization phase (GA).

The enable profile Boot Optimization (PGO) feature, which was in the preview phase in 1.20, has now officially entered a stable phase. The principle of PGO is that "the compiler uses the program's runtime profiling information, so it can generate higher quality code, thereby improving the program's performance." If a file named default.pgo exists in the main package directory, the go command uses the default.pgo file to enable PGO build.

Language changes add new built-in functions:

Min, max, and clear have made several improvements to type inference of generic functions, including the description of type inference in the extension and interpretation specification.

In future releases, the development team plans to address the most common "loop variable capture" problem in Go programming, and the development team has provided a "preview" solution in Go 1.21, which users can now use "environment variables" to enable in their code.

Add a new standard library log / slog package: for structured logging

Slices package: added to perform common operations on slices of any element type. This package is faster and more ergonomic than sort package.

Maps package: for common operations on any type of key-value

Cmp package: used to compare ordered values (ordered values).

Optimize performance Go compiler itself has rebuilt PGO on 1.21, so the speed of building Go programs has been increased by 2-4%, but officials say the specific optimization efficiency will depend on the host architecture.

Support for WASIGo 1.21 has experimental support for WebAssembly System Interface (WASI), Preview 1.

To facilitate writing more generic WebAssembly (WASM) code, the compiler also supports new instructions to import functions from the WASM host:

Go:wasmimport

Tags: Version language support file type programming code function function common program compiler phase compilation programming language host variable team tool performance Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Huawei MariaDB Shulou Information Apple