presented the release of the programming language go 1.20 , which It is developing Google with the participation of a community as a hybrid solution that combines the high performance of compiled languages with such advantages of script languages as the ease of coded, the speed of development and security from errors. The project code is distributed under the license BSD.
syntax GO is based on the usual elements of the SI language with separate borrowing from Python. The language is quite concise, but the code is easily read and perceived. The Code in the GO language is compiled into separate binary executable files performed by native, without the use of a virtual machine (the profiling modules, debugging and other subsystems for identifying problems at the stage of execution are integrated in the form of Runtime components ), which allows you to achieve performance comparable to programs in SI.
The project is initially developed with an eye on multi -flow programming and effective work on multi -core systems, including providing the tools implemented at the level of operators for organizing parallel calculations and interaction between parallel methods performed. The language also provides built -in protective equipment against the permissible areas of the allocated memory blocks and provides the ability to use the garbage collector.
Among changes in the new issue:
- Experimental support for optimization based on the results of code profiling (PGO – Profile -Guined Optimization), which allows to take into account the features determined during the implementation of the program. Accounting for the performance profile during assembly allows you to increase the performance of applications by 3-4%. To include PGO in Go Build, Go Install and other assembly commands added the -pgo option.
- In the package unsafe the functions of sliceData, string and stringData for low -level manipulations (fixed lengths) and rows (lines) and rows (lines) and strings (lines) and strings (lines) and strings (lines) and strings (lines) and strings ( For example, to convert the memory area to which the pointer in the line with the type of string refers and vice versa).
- Rules for transforming types are expanded by order of comparison elements of the array and fields of structures.
- Cover utility is expanded by the possibility of building a Coverage profile for the entire program, and not just Unit tests. For the formation of a Coverage Profille in Go Build, Go Install and other assembly commands, the “-cover” option is added.
- GO utility is spared from the binding to the $ Goroot/PKG catalog in advance compiled packages of the standard library, which made it possible to exclude them from the supply and achieve a reduction in the size of the loaded data. Packages of a standard library, like ordinary packages, are now gathering as necessary and are caching in the assembly cache.