Will Rust Ascend the Throne in 2024?

原创 精选
Techplur
Announcing in a blog on April 4, 2022, the Rust Language Design Team (Lang Team) has released the roadmap for 2024, the fourth version of the programming language after Rust 2015, Rust 2018, and Rust


Announcing in a blog on April 4, 2022, the Rust Language Design Team (Lang Team) has released the roadmap for 2024, the fourth version of the programming language after Rust 2015, Rust 2018, and Rust 2021.

Meanwhile, the language ranked 28th in the TIOBE Programming Community index for April 2022. Rust, which has been criticized for its steep learning curve, appears to be moving toward a future objective of recruiting more developers by making it more approachable.

As mentioned in the announcement, the new roadmap focuses on three major themes: scaling to new users and new use cases, scaling the ecosystem, and scaling the project. In this article, we will sort out the features with the pros and cons of Rust to see what future Rust will bring us in the next two years.


TIOBE index for April 2022 #1-20



TIOBE index for April 2022 #21-30


Rust Lang Roadmap for 2024

The Rust 2024 roadmap contains three general themes, starting with flattening the learning curve. The Lang Team aims to simplify procedures in the new version so that developers only have to deal with the "inherent complexity" of their problem domain and avoid "accidental complexity" from Rust.

To achieve that vision, the Lang Team proposes four high-level goals:

  • More precise analysis, less rigmarole: Enable the compiler to better recognize when code is correct by improving borrow checkers, type inference, etc. Identify and eliminate "boilerplate" patterns, such as copying and pasting the same set of where clauses everywhere.
  • Easier and more direct expression: Where necessary, extend the language so users can express what they want their codes to do more directly, such as in the form of syntactic sugar (e.g., let-else) or by extending the type system (e.g., generic associated types).
  • Improve async support: extend async-await support beyond the current "MVP," like fns in traits, async drop, and other features.
  • Make dyn Trait more usable: Broaden the set of features available for dyn to make using dyn more similar to generics.

The second theme is scaling the ecosystem that will help Rust's users help each other. The Lang Team says there are still many limits and obstacles for library authors, like they can neither control the error messages that users see nor deploy an "unstable" feature that requires a special opt-in to use. Therefore, the team wants to enable library authors to better serve their users by helping manage the lifecycle of features or extending the capabilities of libraries.

The last theme is scaling the Rust project. To make Rust as useful as possible and ensure its quality, stability, and overall consistency, the team looks forward to a new version with timely status checks, clear ownership and communication, and an efficient and open process with supported tools.

It is still early days for Rust 2024, and the roadmap is likely to continue to be optimized and upgraded over time, but right now, Rust has a rapidly growing user base, with hundreds of companies using it for development, including Dropbox, Yelp, and Cloudflare. To maintain the momentum of sound development, the distinctive features of Rust as a programming language will play a crucial role in realizing the goals.


C VS Rust: Playing with Knives VS Doing Parkour?

In some developers' eyes, Rust is just like parkour activity in which you run rapidly with higher memory utilization. With no runtime or garbage collectors, Rust is suitable for critical services with high-performance requirements. Rust could run on embedded devices and is easily integrated with other languages. In the future, this language may become even more important with its speed-up and lower memory footprint, which will make it more convenient to code.

Reliability:

With rich type systems and ownership models, Rust could ensure memory and thread safety and eliminate errors and bugs at compile time.

Productivity:

Rust is well documented and provides a very friendly compiler with useful error messages. In contrast, the compilation errors of C and C++ are widely known to be too confusing to be interpreted. For programming beginners, using the rustc will allow you to focus on important things instead of worrying about insignificant issues like memory safety.

As a famous metaphor among programmers goes: "Pascal is like wearing a straightjacket, C is like playing with knives, and C++ is juggling flaming chainsaws", while Rust is like "doing parkour while suspended on strings and wearing protective gear." Sounding hilarious, though, you can present all kinds of cool moves without hurting yourself in that activity.


Efficiency: Breast the Tape from Lane Eight

Regarding the efficiency of Rust, learning, running, and development are three main dimensions to consider:


1. Learning curve

It is commonly known that Rust has a steep learning curve, and the deeper you dive, the clearer you would find that the difficulty of learning Rust lies not in the language features, but


  • how to integrate the knowledge into practice;
  • how to figure out quick and correct solutions concerning lifecycles, borrowing errors, self-referencing, etc.;
  • familiarity with massive standard library methods (the key to development efficiency);
  • heavy mental load or stresses, especially for the beginning period.


2. Running efficiency

Rust has excellent performance and is almost on the same level as C and C++, as it benefits from zero-cost abstractions, the potential for deeper optimization, and quality standard and third-party libraries.

Meanwhile, Rust could run well without so much performance optimization as long as it is used correctly. There have been many tools and platforms rewritten in Rust to replace the original implementations in C and C++, which has been a trend that cannot be overlooked.



3. Development efficiency

To compete with other languages in the race of development efficiency, Rust is like a runner who starts from lane eight but breasts the tape. When you first start the development process of a project, using Rust may lag far behind Go and Java, but when you start to familiarize yourself with the common methods of standard libraries and even build "muscle memory," the development efficiency will be greatly enhanced that will surpass other languages and generate quality, safe and efficient code natively.


Benefits: A Mighty Weapon for Individuals and Teams

For individuals:

First, learning Rust will make you a better programmer. To learn Rust well, you may need a deep understanding of memories, stacks, references, and variable scopes that may not be necessary for other high-level languages. While in a guided or forced way, your coding quality will be greatly improved through syntax, compiler, and Clippy-like static analysis tools for Rust programming language.

In addition, Rust may encourage you to do some underlying work that will deepen your understanding of OS, networking, performance optimization, and other base knowledge, which will allow you to learn about algorithms and data structures directly or indirectly.

In this process, you may improve your coding skills to get ahead in the labor market.

Second, learning Rust can promote personal irreplaceability. It should be noted that a complicated language has relevant advantages as well, as the difficulty of learning may make you stand out with irreplaceability once you master it. You should not worry too much about the involution in the industry, like Java programmers, who may have encountered a situation where a vacant position can be easily taken over as there are too many people with knowledge of that language.

This could be a win-win solution for both individuals and organizations. On the one hand, companies could hire more skilled and self-driven programmers who know Rust to conduct their business. On the other hand, your skills will not let you down when applying for jobs, and the rewards could be high salaries.



For teams:

It seems that the quality of codes written by Rust is well recognized as developers do not need to worry about potential errors when reviewing, which could enable them to achieve faster development, reviewing, and merging.

With a powerful compiler and various features, codes written by Rust have fewer bugs, and this language is ideal for collaborative development by large teams as it has complete toolchains and superb packing management tools.

Rust may not be the fastest at the development stage, but its costs could be the lowest from a DevOps perspective compared with other languages. Meanwhile, if a team recruits a skilled Rust programmer, he or she may help to drive the whole team. It's not hard to tell whether you have hired a good Rust programmer, but it will take you longer to judge a programmer's ability who uses other low-barrier languages. In short, hiring a great programmer will bring potential rewards and long-term benefits to the team that will earn more for the organization, making the high salary paid to the programmer worthwhile.



Advantages of Rust Over Other Languages

This article does not plan to list a detailed comparison between Rust and other languages but will present the overall advantages of Rust as a reference for developers. It doesn't necessarily mean that Rust is better than other languages, as different users may have various experiences.


C++

Compared to C++, the performance of Rust is nearly the same. However, the strict requirements of Rust will significantly enhance the quality of third-party libraries when it comes to security.

The learning curve for Rust will be steeper at the beginning stage, but C++ will be more complex for further usage scenarios and ecosystems.

Java

Rust is ahead of Java except for some purely numerical computational performance. Meanwhile, since Rust takes up fewer memories, it requires fewer hardware costs accordingly when implementing the same scale of services.

Python

Rust wins in terms of performance and requires a lower runtime environment, which could be solid support for choosing between the two. Besides, Python and Rust are basically as good as each other on adaptability.

Go

Rust is more expressive and has better performance than Go on the thread safety with fewer bugs. Go supports package management since the release of the 1.10 version but still lags behind Rust.


Current Use Cases

AWS: AWS has implemented two serverless computing platforms, AWS Lambda and AWS Fargate, with Rust since 2017. Besides, the Bottlerocket OS and AWS Nitro systems, which are important services for Elastic Compute Cloud (EC2), are rewritten with Rust as well.

Cloudflare: As a heavy user of Rust, Cloudflare has an inseparable relationship with Rust in infrastructures such as DNS, serverless computing, and network packet monitoring.

Dropbox: The underlying storage services of Dropbox are completely rewritten by Rust, reaching tens of thousands of PBs in size.

Google: Aside from some modules in Android, Google uses Rust in multiple sectors, including its latest Fuchsia OS.

Facebook: The social media giant utilizes Rust to enhance the performance of web, mobile apps, API services, and programmed virtual machines for the Hack programming language.

Microsoft: Microsoft chose to leverage Rust to serve several components for Azure, including core services for IoT.

Github and npmjs.com: The two use Rust to serve up to 1.3 billion npm package downloads per day.

Blockchain: Rust is now the first choice for developing blockchain platforms around the world.

Tidb: the most famous open source distributed database in China uses Rust as well.


Views from Developers

@Graydon Hoare:

Rust is technology from the past came to save the future from itself.

@Elon Musk

I'm a fan of Rust, but I choose C for performance.

@wenq1:

Rust could be a self-discipline tool for skilled programmers and reduce the chances of making mistakes for rookies. It could enhance the difficulty in the employment, and work as a mechanism to show off.

@beeplin:

Rust is promising. Any computer with memory will run Rust in the future. As the American folksinger Joan Baez "predicted" decades ago: "we both know what memories can bring, it can bring diamonds and Rust. And if you're offering me diamonds and Rust I've already paid."

By the way, I sincerely look forward to another Diamond language being invented.

@Xu Chen

Rust is especially suitable for rewriting projects that upset you for the first time, as it will give you the chance to be upset again from a different angle.

@feixu

There are many programming languages, and there is no need to worry too much about a language that cannot even enter the list of Top 10. The best ten languages are enough to support the needs of the information society, while others are just reinventing wheels.


Conclusion

Rust is a modern language that incorporates multiple features and has many applications. In the learning process, you may find personal deficiencies in programming skills that may help you correct them and make more progress.

A greater programming language must automatically integrate superb designs, sophisticated ideas, and triumphs that will benefit more users. Since qualities such as no GC, having quality efficiency, powerful engineering, and high safety have been acknowledged by both engineers and academicians, Rust has flourished with welcoming communities and expanding ecosystems that may attract more firms and programmers.

Indeed, a programming language is merely a tool, and there is no need to worship it. However, as most languages evolve rapidly and creatively, we cannot rule out the possibility of seeing one language, most likely Rust, ascend the throne at a specific time, which could help programmers build a brighter future together in 2024 or the next decade.


责任编辑:庞桂玉 来源: 51CTO
相关推荐

2024-02-21 09:44:33

Rust前端

2022-04-20 18:05:00

Rust编程语言开发

2024-01-25 09:10:10

GoRust标准库

2015-11-12 10:32:54

Ascend2营销调查

2024-01-22 00:20:00

2022-04-07 11:03:07

Rust编程语言开发人员

2013-02-25 14:25:39

2023-08-29 12:34:51

昇腾

2024-03-15 08:32:20

JavaScriptRust系统编程

2012-03-17 19:12:49

Android

2023-05-29 16:25:59

Rust函数

2012-05-19 16:58:52

华为Ascend C881

2021-02-24 07:42:34

PythonRust语言

2023-06-15 17:00:11

Rust循环

2012-01-16 09:47:53

OMAP 4460华为Ascend P1S

2023-05-14 18:56:50

Rust数据类型

2022-12-30 11:05:40

Rust代码

2012-05-01 21:17:33

华为

2021-03-19 08:58:19

Rust共享愿景文档开发者

2020-03-13 14:20:02

代码开发 Rust
点赞
收藏

51CTO技术栈公众号