Rust will never fade, make the end more cool!

Source: Internet
Author: User
Tags rust programming language

This article was translated from an article by Matt Asay in Readwrite.com, Rust never sleeps:how Mozilla Could become Cool Again, subtitled "Mozilla has almost faded From memory, but Rust could make it hip again ". The combination of transliteration and transliteration in the title of this translation may be debatable, and readers are welcome to make corrections. This article does not mean that the translator fully agrees with all the views of the author's original text. --liigo, 2015-7-14.

Mozilla has had a good life before.

It launched the Firefox browser used to be the number one opponent of Microsoft ie. Today, Firefox is down to just 12% of its market share-the data comes from the netmarketshare of desktop-system browsers-and the mobile side is worse. Mozilla's other products, such as Thunderbird, do not mention.

It was a surprise that Mozilla's hero was lonely when he launched a rust programming language that could drive the industry to change. The original version of Rust was developed by Mozilla employees Graydon Hoare in 2009, based on the concept of modern programming language design (translator Liigo Note: Graydon seems more inclined to retro programming concepts). It incorporates the flexibility of the high-level language (high-level languages) and the strong control of the underlying language (low-level languages).

In essence, the Mozilla language emphasizes performance and covers a wide range of applications, from operating systems to database software, as well as avoiding the backward-compatible historical burden of other languages. In short, rust has the potential to completely subvert the IT industry, which is significant for Mozilla.

Rust never dies.

Mozilla may have lost its way, but it has recently tried its best to correct its course. The electrolysis project gives Firefox multi-process capabilities, new webassembly standards, and WEBVR virtual reality streams to support the fascinating emerging technologies.

But before these positive moves, Mozilla had a fundamental way of reviving itself: Rust. Rust has been in its pocket for years.

Rust is an amateur project that Graydon started six years ago (Liigo, nine years ago, 2006), and 2010 years later became the official Mozilla support program. Despite company involvement, Rust is still seen as a community-led project supported by many contributors outside of Mozilla.

Mozilla describes rust in this way:

Rust is a new programming language that focuses on performance, parallelism, and memory security. Designers create a language from scratch, incorporating the best of modern programming languages and avoiding the historical burden of traditional programming languages.
Rust combines the expressive grammar and flexibility of high-level languages with the superior control and performance of the underlying language.

The last sentence above is too tempting. Rust has the ability to let developers write kernels (kernels), operating systems (OS), browsers, databases, and so on, which are often less realistic to develop in high-level languages like Google's go language (you simply can ' t Realistically write).

Christoph Burgdorf that:

From one side, rust is a very modern language, it has generics (generics), interfaces (Traits), expression-oriented expressions orientated, pattern matching (patterns matching), closures (closures) And so many exciting features.
Rust, on the other hand, is also a very low-level language, and it does not use the garbage collector (GC) By default, it eliminates the dependency on the garbage collector by simply defining a series of rules that let the compiler do a mandatory check at compile time .

More Burgdorf, Rust provides the ability to provide deep control memory applications, and he writes: "Rust also allows you to have deep control over memory requests for heap and stack space, which is impossible for go because the go compiler uses escape analysis (escape Analysis) (auto) Determines whether memory is requested on the heap. ”

While many new programming languages have sprung up more quickly, Rust has made it unique: it provides the control and performance of the underlying language without forcing developers to become the underlying programming expert.

Making the developer's job simple is the value of the new language, which is even more appealing if it also boosts the developer's grip (boosting their control).

Rust is low and calm.

Stephen O ' Grady of RedMonk said: "Recent and emerging information shows that rust is gradually arousing the interest of more and more developers."

Rust can be applied to new projects and old projects. As developer Jeff Waugh said to me: "I expect a lot of new projects to embrace rust, including new projects, and newer modules in old projects." ”

While there may be other projects that use Rust's newly developed operating system, databases, and more, it is the value of rust to extend existing projects. Mozilla's Servo browser engine is a good example. "It's worth noting that servo reused a lot of (C + +) code, and the core/new functionality was developed in the rust language," said Waugh, "Servo uses rust to complete the full parallel layout (parallel layout) feature, The SpiderMonkey (JavaScript engine) and libpng (parsing PNG images) related functions are reusing old code. ”

In other words, some of the code inside the servo is rust, and many are not. However, it is very effective to develop some code to improve servo (or any other project) through rust, especially for C-based projects. "Some large-scale projects that follow the C language calling convention would like to embed the rust code in," writes Dave Cheney, an Australian author programmer. ”

Is the future the rust of the world?

When it comes to rust, there's a very tangled question: if it's great, why isn't everyone using it?

It's hard to find jobs on rust at the moment, and the hiring trend above Hacker news confirms that. Information from Google search data shows that programmers are less interested in rust.

But don't confuse the current situation with the long-term industry impact. For example, it is not easy because go is now more popular than rust, and it is decided (in the future) that go will win and Rust will lose.

This is the wrong way to compare. "Rust's competitors are C + + and D, and programmers using C + + and D are ready to accept complex syntax and semantics (and hence the lower readability of the code) in pursuit of the highest performance," Cheney explains. "Then, he added," Go's competitors are ruby, Python, node. JS (V8), which has grown in the Internet 2.0 era 2006 years later, and their users have lost patience with the high deployment costs of JVM-based languages. "There is a big difference between their application scenarios and their user base.

I hope go continues to grow, but I guess rust will have a profound impact on the most important processes in our entire industry.

As Peter Bright says, "Rust tries to provide performance and control like C or C + +, while making the security bugs (security-compromising bugs) that are often present in C and C + + more difficult to appear in rust. ”

Mozilla is able to showcase the rust language to C-language developers through its extensive application of rust (Servo/firefox), where some C developers have been looking for better language. By applying Rust,mozilla, the company has also been gradually re-emerging as the dominant force in the field of modern application development.

The graph is from Shutterstock.

Rust will never fade, make the end more cool!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.