Rust
In a recent survey conducted by StackOverflow, the developers voted Rust language as the most loved programming language. Around 65,000 software developers from 186 countries participated in the surveys.
The survey results piqued my interest in Rust and intrigued me to know more about Rust. I tried to get answers to the following questions.
What is Rust?
Rust is a system programming language and could become an alternate for C and C++. It is designed by Graydon Hoare at Mozilla Research, with contributions from Dave Heman, Brendan, and others. Mozilla sponsors Rust. The first stable release of Rust came in 2015. The Rust compiler is free and open-source software dual-licensed under MIT and Apache License 2.0
Where does Rust excel?
Rust is a blazing-fast and memory-efficient system programming language fit for game development, IoT, and Edge computing. It is an alternative for languages like C and C++. This does not mean that it can not be used for web programming.
What is unique about Rust?
Rust is apt for problems where performance is critical. Its performance is very close to C/C++. The Rust creators have kept the speed and security at the center stage while designing Rust. Unlike its predecessors, it preempts a lot of pitfalls at the compile time. It prevents the programs from accessing parts of memory that it should not.
What are the critical features of Rust?
- Memory Safety & Concurrency - It has been created, keeping memory and concurrency at the center stage. The ownership and type systems are a robust set of tools to help manage memory safety and concurrency problems. The Rust compiler can catch a lot of memory safety and concurrency issues and avoid subtle errors. 70% of the issues discovered by Microsoft were due to memory safety. Microsoft is considering Rust to avoid memory protection issues.
- Ownership - In Rust, all values have a unique owner, and the scope of value coincides with the owner's life cycle. Visit Rust website to learn more about Ownership and borrowing.
- Memory Management - Unlike Go, Java, and .NET, Rust does not have an automated garbage collection concept; hence it has considerably lesser resource overhead.
- Cargo - Cargo manages all of the grunge jobs of managing dependencies and packaging. The packaging gives it an edge over C and C++.
Is Rust an object-oriented language?
It is not an object-oriented language, but it does support a few object-oriented principles.
What is the learning curve?
The learning curve for the application programmer is not going to be steep (it is difficult to learn). However, for system programmers, it will relatively quickly come to grips. The documentation and community support is of high standards. Additionally, the syntaxes of languages are akin to C.
I am working on C, why should I move to Rust?
Like C, Rust is also a system programming language. The advantage of using Rust over C its extensive support for memory safety and concurrency. Additionally, C routines can call Rust code and vice versa.
What IDEs support Rust?
VS Code, Sublime Text 3, Atom, Eclipse, IntelliJ Idea, etc.
How good is the Rust ecosystem?
It supports more 42K crates (packages/libraries). Visit https://crates.io/ to know more.
Who are all invested in Rust?
DropBox, Atlassian, npm, Mozilla, Yelp, etc. Visit https://www.rust-lang.org/production/users to see more.
Is it easy to find Rust programmers?
Sorry, I do not know the number.
How do I write Hello World in Rust?
fn main() {
println!("Hello, world!");
}
Can you share more pointers?
~
4 年nice Amit
TEDx Speaker | Culture Custodian | People Strategist | Story Teller| SHRM24Influencer | TalentTechTitan24 | Spiritual Scholar | Engagement Evangelist and cherishing the role of Vice President, People at InfoBeans
4 年Crisp, this blog was my introduction to Rust. Useful to learn about it.