Rust - A programming language created by a broken elevator, can 'surpass' both C and C ++
Rust, a programming language that was born from an elevator failure in an apartment building. It was quickly received by users and widely used.
A new programming language was born from an elevator failure in an apartment building. It was quickly received by users and widely used. It's the Rust programming language, even chosen to improve or create new software instead of C, C++ or Java.
In 2006, when returning home after a day of work, Graydon Hoare was a programmer at Mozilla, the company that developed the open source web browser Firefox, discovered that the apartment elevator was broken due to a software error. This is not the first time such an incident has occurred.
As a programmer, Hoare knows what causes problems that are caused by memory errors. Elevator operating software is usually written in C or C ++, so it is easy to cause memory overflow.
Annoyed by the failure of the elevator, Hoare decided to create a programming language that was flexible, user-friendly, and error-free. And so the Rust programming language - named after a plant disease caused by an extremely healthy fungus, was born.
After 17 years, Rust has become one of the most popular programming languages used by about 2.8 million programmers. It is seen by companies like Amazon or Microsoft as the programming language of the future because it solves some of the common problems in languages like C and C++, especially memory overflow.
Computer memory is like a chalkboard. When the software works, the data is written to the table for checking, if no longer needed, then it is deleted.
Each programming language has a different way of managing memory. C or C++ gives programmers flexible control over how and when the software writes data, but this in turn requires them to carefully monitor the area of memory being written to and when to clean up the data. The software can write to the area that contains the data if the programmer accidentally forgets to clean it up.
Programming languages such as Java, JavaScript or Python are equipped with a component that can periodically search for and clean up elements that the program is no longer using. This reduces the risk of overflow, but requires a lot of resources to operate.
Hoare designed Rust to strike a balance between resource consumption and memory cleanup. Rust will automatically search for the location of the data to be cleaned up, but requires the programmer to strictly follow the rules of coding, about how to use and copy data in the software.
Or to put it simply, Rust will be harder to code but the memory won't fail.
The Rust design team, in addition to Hoare, who has 10 years of experience in the software industry, has many other members such as software engineers Niko Matsakis and Felix Klock, who have experience in memory and language research. program.
In 2009, Rust was invested by Mozilla as an open source project. By the early 2010s, Rust received support from the worldwide developer community.
On May 15, 2015, the first stable version of Rust was released, and a year later Mozilla released Servo, a browser engine written in Rust.
In 2017, Rust was used in Firefox's CSS renderer, making it faster. After that, Rust is more and more widely used as on Dropbox, Discord, Amazon Web Services
Research shows that code written in Rust is as efficient as Java but consumes only half the power.
After 17 years of being born, Rust has become a highly appreciated programming language, even being widely proposed by Microsoft leaders to write new software instead of C and C ++.
Rust with the advantages of fast, simple, friendly and safe will be used more to create new software in the future. Of course, C and C++ won't disappear for decades to come.
You should read it
- Rust - interesting programming language worth learning
- Documenting a Rust project with mdBook
- Ways to handle errors in Rust
- Asynchronous Programming in Rust
- Microsoft officially announced the Rust / WinRT project on GitHub
- How to containerize a Rust app with Docker
- What is Unsafe Rust?
- Why the Rust programming language will be the future of programming
- Things to know about Fearless Concurrency in Rust
- How to mine and fetch data using Rust
- How to set up a Rust environment on Linux
- Top 3 Roblox games like Rust