📜 ⬆️ ⬇️

Rust in 2016

2015 was a significant year for Rust: we released version 1.0, stabilized most of the language elements and a bunch of libraries, grew significantly as a community, and also reorganized project management . It may seem that 2016 will not be as interesting (it will be difficult to surpass release 1.0 ), but it will be a super-important year for Rust, in which many exciting things will happen. In this article I will talk about what I think should happen. This is not an official position or promise of Rust developers.

2015


Before we talk about the future, here are a few numbers from last year:

In 2015, by the Rust community:
')

2016


As in the second half of 2015, I expect to see a lot of gradual improvements in 2016: polishing libraries, correcting compiler errors, improving tools and increasing the number of happy users. There are also quite a few big changes on the horizon - in recent months we have spent a lot of time on planning, refactoring and consolidating the project, and I expect it to bear fruit.

Tongue


Specialization of implementations (impl specialization) is the possibility of having several implementations of a type for one type, when it is possible to determine the most particular of them. This opens up opportunities for optimization and solves some annoying questions. The existing RFC is almost accepted and work is well underway. A good choice for the start of 2016.

Recently, we are also discussing an effective implementation of inheritance (a la virtual structures). There is some beautiful relationship between specialization and inheritance , so much of the plan has already been drawn up. There are still some important gaps, but I hope they will be filled.

Another new feature of the type system that has been discussed recently is abstract return types, sometimes also called “impl trait”. It allows you to use the type (instead of type) as the return value of the function. The idea is simple, but there are several issues that need to be resolved. But since the community has a need for this opportunity, I think it will be implemented in 2016.

The new memory allocation system and placement box syntax will allow Rust to satisfy a bunch of system programming needs (for example, allowing the user to select an allocator for a certain collection). It is also the door to the return of garbage collection in Rust. Felix Klock is working hard on the design and implementation to make these opportunities appear this year.

My greatest task in terms of language will be the reconstruction of the macro system, in particular, the appearance of procedural macros, which in the end should become a full-fledged part of a stable Rust. I wrote about this in detail in my blog .

One of the not very strong points of Rust is error handling. We discussed various options to make it more convenient, and it seems that soon the favorite option will be adopted as an RFC . Is this statement added by the operator ? which works like a try! macro try! (for example, it will be possible to write foo()? where today you write try!(foo()) ), and also introduces a new try ... catch expression that allows you to intercept and handle exceptions. I expect that this proposal (or in any case, very similar) will be accepted and implemented very soon.

We could finally say goodbye to the drop-flags . One way or another, we dream about it.

Libraries


I expect 2016 will be the year of libraries. The standard library looks good, and I think only minor improvements will appear in it. I also think that we will include some external packages in the standard library, but most likely it will happen slowly and gradually, towards the end of the year. On the other hand, many interesting things will happen outside the Rust repository, both in the incubator and in other places.

The libc library is pretty much laid out, so I think that this year it will be polished and move in the direction of stabilization.

rand is another crate from the incubator , the stabilization of which can be calculated, and I do not think that there will be any major API changes in the future.

One of the most exciting packages is mio , which provides very low-level support for asynchronous IO. I expect to see a significant development and movement towards obtaining official status this year.

There are also some really interesting packages related to parallelism: crossbeam , rayon , simple_parallel , and others. I have no idea what we will eventually come to in this area, and I will be very interested to see it.

Instruments


I think 2016 will be exciting in terms of development tools for Rust. For us, this area has a high priority, and I would like to emphasize some of the things we are working on:


Community


It was great to see the community grow in 2015, and I hope it will grow even more in 2016. I look forward to meeting new amazing people and new interesting projects, expect to see new articles and new views on the language from the point of view of people with various previous experiences, expect more meetings and most of all!

Also, at least one book about Rust will be published this year, and we hope that there will be more. Along with improvements in online documentation, I think this will be a real incentive for newbies to learn Rust.

I do not know about the official plans, but I hope and look forward to the next Rust Camp this year. It was fun at last year’s event , and I’m sure it would be great to see a sequel.

I also expect to see how Rust is becoming more “serious” - its use in production and important open source projects. I expect to see how existing projects on Rust become more significant in their own right, and not just as “projects using Rust”.

Some things that I think will not happen


Types of higher order - I think we all want them in one form or another, but this is a huge challenge in terms of architecture and a large number of issues that need to be worked on. I would be very surprised to see a solid RFC on the introduction of higher order types this year, not to mention the implementation.

Backward incompatibility - after 1.0 we were pretty good at maintaining stability and didn’t break things that were already working, and I’m sure that we can continue this trend.

2.0 - there is a discussion about the release of an incompatible version of Rust back, but it looks less realistic for 2016. So far we manage to move within backward compatible releases well enough, and there is nothing that would require us to release back an incompatible version. I do not think that we can always do without the release of 2.0, but I think that this will definitely not happen in 2016.

Regardless of what exactly happens, I believe that 2016 will be a great year for the whole community. Happy New Year!

Source: https://habr.com/ru/post/274757/


All Articles