Go 1.25 Removes Core Types, Simplifying the Language Spec

2025-03-26

Go 1.18 introduced generics, and with it, the concept of "core types" to simplify handling generic operands. However, this added complexity to the language specification and limited the flexibility of certain operations. Go 1.25 removes core types, replacing them with clearer and more concise rules, thereby simplifying the language specification and opening the door for future language improvements, such as more powerful slice operations and improved type inference. This change does not affect the behavior of existing Go programs.

Read more
(go.dev)

Go 1.24 Boosts Wasm Capabilities: WASI Reactors and Exported Functions

2025-02-14

Go 1.24 significantly enhances WebAssembly (Wasm) support with the introduction of the `go:wasmexport` directive and the ability to build WASI reactors. This allows Go developers to export functions to Wasm, enabling seamless integration with host applications. The new WASI reactor mode facilitates continuously running Wasm modules that can react to multiple events or requests without re-initialization. While limitations exist, such as Wasm's single-threaded nature and type restrictions, Go 1.24's improvements pave the way for more powerful and versatile Go-based Wasm applications.

Read more
(go.dev)
Development

Go Protobuf's New Opaque API Improves Performance and Safety

2024-12-16

The Go team released a new Opaque API for Go Protobuf, coexisting with the existing Open Struct API. This new API decouples generated code from its underlying memory representation, leading to performance improvements, reduced memory allocations, and enabling optimizations like lazy decoding. By hiding struct fields and accessing them only through accessor methods, it prevents pointer-related bugs and accidental sharing. Migration involves enabling the Hybrid API, using the `open2opaque` tool, and then switching to the Opaque API. The existing Open Struct API remains supported.

Read more
(go.dev)
Development