Go 1.22: Combining Performance and Ease of Use
Google, in collaboration with the community, has released go 1.22, the latest version of the programming language. This hybrid solution combines the high performance of compiled languages with the ease and speed of development typically associated with script languages. The project code is distributed under the BSD license.
The syntax of Go is based on elements of the SI language, with some borrowings from Oberon. Despite its conciseness, Go code is easily readable and comprehensible. The language compiles code into separate binary executable files without the use of a virtual machine. The runtime components handle profiling modules, debugging, and other subsystems to identify problems during execution, resulting in performance comparable to programs written in SI.
Go was initially developed with multi-flow programming and effective utilization of multi-core systems in mind. It provides operators to organize parallel calculations and enables interaction between parallel methods. The language also includes built-in protection mechanisms to prevent accessing restricted memory areas and utilizes a garbage collector.
The new release, go 1.22, comes with several changes:
- The “for” loop now includes the ability to determine the range of entire numbers. For example, to iterate over values from 0 to 9, you can use the syntax “for i := range 10 {…}”.
- An experimental feature, the support functions of determining the function as an ITERTRITER, has been added to the “for” loop. This allows for syntax like “for i, x := range slices.Backward(s) {…}”.
- A long-standing issue with “for” loops that caused concurrency problems when changes were made in different iterations has been resolved. Previously, the output of certain code could be incorrect. However, with the new version, the expected output will be displayed.
- Optimization of memory in the runtime has led to a 1-3% increase in performance and a reduction in memory consumption in most applications by 1%.
- The new version of the compiler incorporates optimization compiles based on