CSDN home page published to my interview: Why should I choose rust?

Source: Internet
Author: User
Tags documentation memory usage touch rust programming language

This year (2015) June 30, CSDN website home published the beauty editor Xiameng to Me (Liigo) interview article, the title is "interview senior programmer Zhongxiaoli: Why should I choose Rust." 》。 CSDN Home Forwarding My blog post there have been many times, but most of them are purely text links, this time in the first page of the most prominent position of the hanging title map and summary, is undoubtedly the most solemn. In this interview, I briefly introduced the core features and unique advantages of the Rust programming language and shared the main reasons why I chose the language of rust. If you are trying to find the highlights in the rust language, expect to have a certain harvest after reading this article. The full text is reproduced below.

CSDN: When did you start to touch the rust language? Where is it that attracts you.

Zhongxiaoli : I've been in touch with the rust language for about half a year since 2013. It claims to have solved the traditional C and C + + language for decades in the memory security problems of the blame, but also maintain a very high operational efficiency, deep bottom control, a wide range of applications.

Its ownership mechanism is very bright, no virtual machine (VM), no garbage collector (GC), no runtime (runtime), no null pointer/wild pointer/memory out of bounds/buffer overflow/Segment error, no data contention (Race) ... All this has attracted me deeply--the pain and joy of a more than 10-year-old programmer who has been tortured by the C language. CSDN: What kind of language is rust, in your opinion? It is suitable for developing what type of project. Why do you say rust is not afraid of any competitor, it can replace the C-language status, but also can challenge the C + + market, and Java, Python share. What are the superior features of rust compared to these languages?

Zhongxiaoli : Rust is a system programming language that is ideal for developing system software that is sensitive to CPU and memory usage, such as virtual machines (VMS), Containers (Container), database/game/Web servers, browser engines, simulators, and so on, all of which are primarily C /c++ 's traditional territory.

In addition, Rust has a strong presence in the low-level development areas of the system, such as bare metal (bare metal), operating system (OS), kernel (kernel), kernel modules (mods), to challenge the traditional Boss C language in this field. Rust's rich language features, state-of-the-art design concepts, and easy project management enable it to perform well in upper-level application development, at least in a better performance than with VMS and GC languages. The non-GC implementation of the memory security mechanism, the concurrency mechanism without data competition, and the abstraction mechanism without runtime overhead are unique features of rust.

Other languages are difficult to achieve at the same time, for example, traditional C + + cannot guarantee memory security, and Java/python cannot eliminate runtime overhead. But rust is still a very young project, it takes time to release influence, it takes time to be widely accepted by the world, and its potential can erupt and take time to test. We just have to wait patiently. CSDN: Rust has specific practical use cases in China.

Zhongxiaoli : Because Rust1.0 official version just released less than a month, in the domestic influence is not big, we can not demanding it in the domestic have practical application cases. But abroad, a couple of years ago, OpenDNS and skylight used rust in the production environment. There are also "two semi-large application cases" such as browser engine servo, rust compiler and standard library, project manager cargo. This is enough to illustrate the maturity and practicality of the rust language. CSDN: You are involved in the Rust1.0 version of the code contribution, now the release of the official version has been released, how do you feel about it. Whether the language has reached a more mature stage.

Zhongxiaoli : I actively participated in the Rust language open source project and contributed to the source code three times in a row on the Rust 1.0 alpha, Rust 1.0 beta, and Rust 1.0 official editions published in the official website. In the course of the Rust 1.0 release, and for a long time, developers have made a great effort to ensure that the Rust 1.0 official version under the Semver 2.0 specification must be backwards compatible unless a major bug has to be fixed.

In my opinion, after the official release of 1.0, Rust has entered a more mature stage. Moreover, rust is still in the rapid iterative development process, 1.0 released 6 weeks after the release of 1.1, 6 weeks later will be released 1.2, will inevitably be a step, more mature and stable. CSDN: In addition to the functional priorities, in your opinion, rust is moving in any direction. What features can be expected from rust in the future.

Zhongxiaoli : Rust will continue to evolve along the established direction of "Ensuring memory security, no operational overhead, and efficient utility." The language features that are expected in the short term are: Dynamic drop, biasing, inheritance, improved borrow checker, improved macros, and syntax extensions. Other features that are expected in the short term include enhanced file system APIs, the provision of memory request release APIs, better support for Windows and arm, faster compilation speeds, a more convenient binary distribution mechanism (MUSL), more useful tools, and more. CSDN: As far as I know, you've been a bit more into the go language before, why think about giving up go to rust.

Zhongxiaoli : Not to mention the go language, but I have tried hard to accept the go language, 2011 the end of the year I have spent nearly half a year in depth focus on the go development process, made a lot of specific improvements and suggestions, but also tried to contribute to the source code. Later, considering that the go language design concept was too biased to me, the community was not very friendly, and slowly alienated it. I've written a blog about why I gave up the go language and talked about a lot of specific reasons. CSDN: Domestic, many developers involved in rust code contributions. Have a core of people. What communities are maintaining rust.

Zhongxiaoli : There are not many developers involved in the Rust code contribution in China, but there are many, and the official contributors list also occasionally several seemingly Chinese names. Rust's core developers are mostly Mozilla employees who are dedicated to developing and maintaining rust languages and related projects, and the rust community is primarily involved in organizing and managing them. Community discussions focused on the GitHub Project homepage rfc/pr/issue official, discuss forum/irc, Reddit, HN, StackOverflow, etc. CSDN: How to learn rust for developers. Please share your experience.

Zhongxiaoli : Since Rust has just been released soon, there are limited learning materials in all areas, and I can share few experiences. The first recommendation is to learn about Rust's official documentation: Rust Study Manual: Https://doc.rust-lang.org/nightly/book/Rust Learning Example: http://rustbyexample.com/ Rust Standard Library Documentation: HTTPS://DOC.RUST-LANG.ORG/STABLE/STD/RUST language Specification: https://doc.rust-lang.org/stable/reference.html

For developers who already have experience with C + + development, take a look at this tutorial, which is a rust textbook specifically tailored to C + + programmers. Although this is not an official document, the author is a member of the Rust development team, and the quality of the documentation is guaranteed. In addition, it is recommended that you pay more attention to the rust topic of the Reddit website, where there are many valuable information (addresses) shared by rust programmers around the world. Chinese information is less, you can see my participation in the preparation of the rust Chinese community, with the vast number of domestic developers to exchange progress: http://rust.cc. In addition, you can also discuss and communicate in the csdn-geek-the-rust community.

Author Profile: Zhongxiaoli (network ID is liigo, csdn blog), Shandong Province Liangshan County People, Gen Y, 2002 graduated from Shandong University of Technology. Engaged in IT industry for more than more than 10 years, including nearly 10 years focus on the development of Easy language (eyuyan.com) programming platform, long-term as Dalian Wu Tao Easy Language Software Development Co., Ltd. Research and Development Department minister. He later participated in the development of embedded software for a short time. Currently in the education industry responsible for video training software development.

This article is selected from the programmer electronic version of the June 2015 B issue, this issue more articles please check here. 2000 to date all articles catalogue please check the programmer cover show. Welcome to the electronic version of the programmer (including ipad, Android, pdf).

(Zebian/Xiameng)

This article for csdn original article, without permission not reproduced, if necessary reprint please contact market#csdn.net (#换成 @)

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.