Release of Rust 1.78. Borgo language, combining the strengths of Go and Rust

The release of the general-purpose programming language Rust 1.78 has been published. It was originally developed by Mozilla but is now being advanced under the auspices of the independent non-profit organization Rust Foundation. The language focuses on safe memory management and provides tools for achieving high task parallelism without relying on garbage collection and runtime (runtime is limited to basic initialization and supporting the standard library).

The memory management methods in Rust relieve developers from errors when manipulating pointers and protect against issues arising from low-level memory operations, such as accessing memory after it has been freed, dereferencing null pointers, buffer overflows, and so on. For distributing libraries, ensuring builds, and managing project dependencies, the package manager Cargo is being developed. A repository at crates.io supports library hosting.

Safe memory handling in Rust is ensured at compile time through reference checking, ownership tracking of objects, lifetime consideration (scope) of objects, and assessment of memory access correctness during code execution. Rust also provides means to protect against integer overflows, mandates the initialization of variable values before use, improved error handling in the standard library, employs the concept of immutability for references and variables by default, and offers strong static typing to minimize logical errors.

Key innovations:

Additionally, the programming language Borgo can be noted, which aims to be more expressive than Go while being less complex than Rust. Borgo combines the best features of Go and Rust, addressing the shortcomings of each language. For instance, Go is simple and easy to understand but does not provide advanced tools for type safety. Rust provides means for safe programming but is overly complicated. The project is developed by Marco Sampellegrini, author of 'The Simple Haskell Handbook' and developer of the continuous integration system Quad CI.

Release of Rust 1.78. Borgo language, combining the strengths of Go and Rust

Borgo uses static typing, similar types to Go, and a syntax reminiscent of Rust. Specifying semicolons at the end of lines in Borgo code is not mandatory. Borgo code compiles to Go representation, which is fully compatible with existing Go packages. The compiler code is written in Rust and is distributed under the ISC license. use fmt enum NetworkState { Loading, Failed(int), Success(T), } struct Response { title: string, duration: int, } fn main() { let res = Response { title: 'Hello world', duration: 0, } let state = NetworkState.Success(res) let msg = match state { NetworkState.Loading => 'still loading', NetworkState.Failed(code) => fmt.Sprintf('Got error code: %d', code), NetworkState.Success(res) => res.title, } fmt.Println(msg) }

Source:
opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster