Go 1.21rc1 is released! It’s not a final release yet, but we already can see what new features will be there, and that’s huge:
- Built-in function
clear. You know, like in all other normal programming languages.
- Experimental fix for the loop variable capture, one of the most common Go mistakes.
- Profile-guided optimization is now stable. The Go compiler itself now uses it to make its code 10% faster.
- Structured logging, with both human-readable and JSON output. For me personally it 100% replaces any third-party logging libraries.
- Generic functions for slices and maps.
- WASI support. WASI is the standard of defining system calls in WebAssembly.
The release notes draft: https://tip.golang.org/doc/go1.21