Why I am Learning Rust
Why I am Learning this Complicated Language
Rust as a programming language has been around the block for a while. Created in 2006 by Graydon Hoare as a side project while he was at Mozilla. It features a friendlier syntax than C++ and improved code safety over languages such as javascript. It is a strongly typed language. As measured by Stackoverflow at the time it ranks with a 4.8% share of popularity and is ranked 16th in the number of GitHub repos. But according to the most recent Stackoverflow survey(2020 as of this writing), it is the most loved programming language.
Why it would rank number 1 as most loved language and not show substantial gains I won’t get into much here. It is a low-level language so web programming is not something it is well suited for. The entrenched use of Java and C++ may have something to do with it.
Blockchain
This is the main reason I would suggest any programmer gets familiar with and learns Rust programming. According to this survey, large blockchain ecosystems are driving the adoption of Rust in that space. According to this survey, Polkadot is driving the increased use of Rust.
Another crypto blockchain project Solana also uses Rust as the backbone of their ecosystem. Solana has grown into being one of the main blockchain ecosystems at this point in time. It runs faster than Ethereum and has lower transaction costs than Ethereum too.
It is also part of learning and developing on the Terra Luna blockchain.
Type Safety
When compiling code that is not type-safe, or another way to think about it, code that does not define types before compilation takes longer to run and compile.
There are two aspects to the type safety that Rust employs.
Strongly typed is a term used for Rust, Ruby, Python, and a few other programming languages. Strongly typed means that the structure of the language makes it difficult to create a program that will have bugs.
Rust is also statically typed. This means that all variables are given a type before the time of compilation. This makes for more efficient program execution as the compiler does not need time to decide what the variable type is.
I like this. I want that compiler to know what type it has and I want a language that makes it hard to create bad code and easy or more straightforward to create good readable efficient code. When working in a larger development team this makes code production efficient.
It is Not Javascript
I started as a Ruby developer and used Python a lot while I was studying programming in a coding school. And then I have used javascript and more so typescript in production environments from Cambia Health Solutions to Microsoft and at API3. I have used typescript a lot in my development career and it is time to learn something new.
Learning a new language I find exciting and a worthwhile challenge for many reasons. For one, you learn to understand the main language you use better. When you understand how a language handles types or if it utilizes garbage collection or heavily uses enums capturing these skills makes your understanding of the language you use deeper. You might find a new way to handle a problem for instance.
It is Highly Popular With the Devs Who Use it
Rust repeatedly is ranked as the most loved programming language. In recent polls of developers, Rust continually ranks as the most loved programming language and has for five years running. That says something about the quality of code that developers can produce with Rust.
I have attended Rustconf several years in a row now and I think this is the most accepting programming community that exists.
Concurrent Programming Done Right
Plain and simple Rust avoids most if not every race conditions. Well not every race condition, but it does make it more difficult to create a race condition.
“In Rust, data races are detected. If given object access does not support many threads (i.e. is not marked with an appropriate trait), it needs to be synchronized by a mutex that will lock access to this particular object for other threads. To ensure that operations performed on an object will not break it, only one thread has access to it.” Link
I hope this gives you some incentive to learn some Rust. I know there are more technical articles on Rust out there, but I was not trying to emulate that structure. I was trying to give you a more practical reason to try out Rust.
Thank you
Chester Beard
My article on why you should learn Solidity. https://chester-beard.medium.com/why-learn-solidity-a0f719e7b83a