Go 1.19 has already been released and these are its news

Recently the release of the new version of the programming language «Go 1.19» was announced, a version that improves the previous release by adding various improvements and, above all, bug fixes. Of the novelties that we can highlight are the improvements in memory management, security improvements, among other things.

For those who are new to Go, you should know that this is a programming language that is developed with the participation of the community as a hybrid solution that combines the high performance of compiled languages ​​with advantages such as scripting languages ​​such as the ease of writing code. development and bug protection.

The syntax of Go is based on the usual elements of the C language. with some borrowings from the Python language. The language is quite terse, but the code is easy to read and understand.

Go code is compiled into separate binary executable files that run natively, without using a virtual machine (profiling, debugging, and other runtime troubleshooting subsystems are built in as runtime components).

Go 1.19 main news

In this new version of Go 1.19 that is presented, it is highlighted that work has been done to refine support for functions and generic types added in the latest version, with the help of which the developer can define and use functions designed to work with several types at once, plus performance optimization of some programs using generics has been increased by 20%.

Another change that stands out from the new version is that added support for links, lists, and simpler syntax to define headers in document comments. The gofmt utility provides formatting with the advanced features of comments in mind with the API documentation.

Besides it revised Go memory model to align with C, C++, Java, JavaScript, Rust, and Swift which do not admit sequentially consistent atomic values. New types like atomic.Int64 and atomic.Pointer[T] have been introduced in the sync/atomic package to make it easier to use atomic values.

On the other hand, it is also mentioned that garbage collector now has the ability to define soft limits, which are enforced by limiting the size of the heap and returning memory to the system more aggressively, that is, consumption is not guaranteed to be within the specified limits under all conditions. Soft limits can be useful for optimizing programs that run in fixed memory containers.

It is also highlighted that on Unix systems, additional file descriptors are automatically enabled (by increasing the RLIMIT_NOFILE limit), to speed up large change expressions on x86-64 and ARM64 systems, jump tables are used, which allow large change expressions to be processed up to 20% faster.

On riscv64 systems, passing function arguments via CPU registers was implemented, which allowed for a performance increase of around 10%.

Of the other changes that stand out from this new version:

  • Numerous performance optimizations have been implemented.
  • Added support for dynamically setting the routine stack size to reduce the size of the copied data
  • Added experimental support for Linux environments on systems with Loongson processors based on the 64-bit LoongArch architecture (GOARCH=loong64).
  • Changing the memory model did not affect compatibility with previously written code.
  • Added a new "unix" build restriction that can be used in "go:build" lines to filter out Unix-like systems (aix, android, darwin, dragonfly, freebsd, hurd, illumos, ios, linux, netbsd, openbsd, solaris).
  • To improve security, the os/exec module now ignores relative paths when expanding the PATH environment variable (for example, when determining the path of an executable file, the current directory is no longer checked).

Finally, if you are interested in learning more about this new release, you can check the details at the following link.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.