Date: 3 months ago   Category: Hi-Tech

Release of the Rust 2018 (1.31) programming language

The release of language of system programming of Rust 1.31 developed by the Mozilla project is presented. Except the regular version number release also обознечен as Rust 2018 is also presented as the most important release from the moment of formation of version 1.0 in 2015. Within release work on consolidation of all improvements and changes prepared for the last three years in the form of a complete product is carried out. Rust 2018 will act as a basis for increasing functionality in the next three years, how the release of Rust 1.0 became basis for development of language in last three years.

For division of incompatible functionality is entered the concept of editions of language. Editions with numbers "2015" and "2018" can be used as a tag for definition of a cut of a condition of the language (the field "edition" in section of "[package]" of metadata of cargo-packages) affecting only incompatible changes.

the Editorial office "2015" includes the functionality which is already stabilized by a present situation and all future changes which are not breaking compatibility, and the editorial office "2018" in addition covers the innovations breaking compatibility offered in flow output 1.31 and approved for realization in the future. Except the language of edition also consider a condition of tools and documentation (for example, modules of support of IDE, rustfmt and Clippy are entered into editorial offices 2018 in structure).

the 2015 Mode allows to keep full compatibility with the existing applications without introduction of the changes breaking compatibility. To activate the 2018 mode makes sense to involve if desired in the code future opportunities of language, such as yet not implemented concepts of async/await and "try". As the present possibility can demand updating of the code of the old programs written before reservation of the words async, await and TRY, the specified keywords are already introduced in the editorial office "2018" in spite of the fact that the functionality is not added yet.

In other words, in release of Rust 1.31 is in advance made fixing of keywords for yet not the ready innovations breaking the return compatibility, and expected in the next three years. At the same time the future changes and innovations which are not leading to violation of compatibility in process of the emergence will be available to packages irrespective of the chosen edition - specific to the editorial office "2018" and not getting to the editorial office "2015" will become only the changes breaking compatibility.

Main innovations of Rust 1.31: The NLL equipment (Non-Lexical Lifetimes) which expanded a system of accounting of time of life of the borrowed variables is realized. Instead of a life time binding at the lexical level, NLL carries out the accounting at the level of a set of indexes in the column of a stream of performance. New approach allows to increase quality of check of loan of variables (borrow checker) and to allow performance of some types of the correct code which use led to a mistake conclusion earlier. The new behavior significantly simplifies debugging. For example:

of fn main { let mut x = 5; let y = &x; let z = &mut x; println! ("y: { }",



just now

In Zaporizhia the swindler who managed to take control of medical and office supplies with a total cost of 1.2 million hryvnias acted. the Swindler, maternity hospital from the Luhansk region, worke...

just now

On Donbass the Ukrainian defenders who protected Ukrainians from the Russian invaders of On Donbass, on Friday, March 22 died, two Ukrainian defenders died. One of them died when performing a fighti...

just now

In the Sumy region there was a shocking case: the 62-year-old man himself cut off to himself a leg. The man cut off an extremity which began to decay because of gangrene a kitchen knife then his cohab...

just now

Visitors of amusement park in Paris suited a small crush, having taken noise of the faulty escalator for attack of terrorists. "The representative of police told that vacationers in Disneyland Paris...

just now

Spanish national team started in selection cycle Euro-2020. First it seemed that the match with Norway will become easy walk. Spaniards opened the account in the 16th minute when Rodrigo closed signat...

just now

The businessman from Ovidiopol breaks down all templates and stereotypes concerning agrobusiness in Ukraine. It grows up exotic plants which for years were considered as "overseas". Besides, he shar...

just now

Slovakia already started in selection of Euro-2020 - the other day the team changed Hungary (2:0). And here this procedure is only necessary to Wales - it missed the first round in view of the odd num...

just now

Meteorologists warn about the approaching storm which will last from March 24 to March 29. Magnetic storms influence not only operation of electric devices, but also health of all live organisms, Po...