Issue of programming language GO 1.18

is presented Language of programming language go 1.18 , which Google is developing with the community participation as a hybrid solution that combines high productivity of compiled languages ​​with such advantages of scripting languages ​​such as the ease of writing code, the speed of development and error security. Project code spreads under a BSD license.

Syntax GO is based on the usual elements of the C language with individual borrowings from Python. The language is quite laconic, but the code is easily read and perceived. The code in the GO language is compiled into separate binary executable files that are valid without using a virtual machine (profiling modules, debugging and other subsystems to identify problems at the execution stage are integrated as Runtime components ), which makes it possible to achieve performance comparable to C programs.

The project is initially developed with a loan to multi-threaded programming and efficient work on multi-core systems, including providing the tools implemented at the level of operators to organize parallel computing and interaction between parallel using the methods. Language also provides built-in tools for the protection against the allowed areas of selected memory blocks and provides the ability to use garbage collectors.

in new version Added support generalized functions and types ( generic ), with which the developer can determine and use functions designed to work immediately with several types. Also provided with the ability to use interfaces to create combined types covering several types of data. Support
Generics are implemented without disrupting backward compatibility with an existing code.

// Summation of set values ​​operating for Int64 types and Float64 Func SumintSorfloats [K Comparable, V int64 | Float64] (M MAP [K] V) V {VAR S V For _, V: = Range M {S + = V} Return S}
// Another option with a generalized definition of type: Type Number Interface {int64 | Float64} Func Sumnumbers [K Comparable, V Number] (M MAP [K] V) V {VAR S V For _, V: = Range M {S + = V} Return S}

Other improvements:

  • in the standard toolkit integrated utilities for Fuzzing testing code. In the course of FUZZing testing, the flow of all sorts of random combinations of input data and the fixation of possible failures during their processing is carried out. If some sequence leads to the collapse or does not correspond to the expected reaction, then such behavior with a high probability indicates an error or vulnerability.
  • Added support for modu-modular workspaces

/Media reports.