Why RUST is making Headlines....???
The tech environment is bit of Rust'y nowadays. But what makes Rust so popular ??
Rust, is Must..??
2024 started off with many programmers and influencers dropping videos on top languages to learn in the year and Rust was in every other video. Everyone pounced on Rust and published their material (me too).
I am not giving syntax and sample programs but rather a clean and quirky beginner friendly article. This means 'Just Theory and No Practicals' .
This article is for just to get a slightest hint of what the thing is and what are its applications.
Is Rust is Must ?
How it's started...?
A malfunction in a lift made the way for development of one of the most popular and exciting languages in this era. The Legendary RUST.
What was the story of the Broken Elevator...???
In simple words- Some memory errors in the program of elevator caused the elevator to malfunction.
Read full story here - (But do come back to read my article)
The story led the way for inception of Rust which can handle memory efficiently.
The common problems in memory management was ruled out by Rust like Memory errors, concurrency , Pointer references and dereferences which was there in C, C++.
Rust easily become top choice for developers being memory safe, performance efficient , providing high level of data abstraction. A language that gave control to developers to do the memory management.
A language so versatile that can be used in low level system programming to high level in web development.
A language that has a powerful package manager and an active community of developers.
Why RUST over Other.....???
Memory Safe -
Rust gives direct control over memory management. It's memory-safe , without garbage collector. Gives no room of error for memory related issues. Its good for elevators though like we have control over elevator buttons , Rust has one on memory.
Ownership Model-
Rust use ownership model for memory safety. One can borrow or reference to a value which adherers to certain rules. Allocating and deallocating the memory when not needed. A borrow checker is used to scope, duration , lifetimes of the references giving complete control over the memory.
Strict Rules at compile time-
Rust enforces strict checking at compile time to avoid runtime errors which is ideal for system programming. It has strong and static type system that catches merry bugs at compile time itself.
Concurrency and No data races -
Rust's ownership model and borrow checker prevents data races which can cause unpredictable program behaviour , performance, debugging , security issue. It makes easy to write concurrent code.
No Null or Pointer References-
No null and pointers can be suicidal sometimes causing severe security issues or might cause your code crash. It puts your code and life at danger. Rust doesn't uses any of them means it has all the life-saving measures covered.
Friendly -
Rust is friendly while integrating with other languages , Mainly systems languages like C, C++. It easily merges with codebases and libraries . Also its active community and strong documentation lays foundation for the one of the best languages for mankind travelling through elevators.
Rust, Really....???
Well , Rust has some significant disadvantages which can be taken into consideration before choosing Rust..
Still JavaScript, Python >>> Rust
There's no running away from the fact that Javascript and Python are far more superior with their extensive libraries ,communities and use cases. Also they are heavily adopted and extensively used so Rust might need more time to settle down in tech industry. Also the native tools, third party tools, IDE's supports are excellent for other languages than Rust.
Still for webdev JS and Py are big players and Rust is a newbie player who is not that widely used.
No garbage collector..? , a headache actually..
Manual memory management can be tidy sometimes. Some dev's prefer auto memory management while they focus more on other complex logic but that's not the thing with Rust. No garbage collector means increased complexity with memory management which is error prone. Garbage collector is handy in many scenarios but absence of the same is one of the 'not so good thing sometime' in Rust.
Not so easy to learn....
Rust is not that friendly for new developers who are new to system programming and concepts like borrowing and ownership model like concepts of rust which is complex.
Sometimes something is good but is not actually..
Rust's strict Rules and ownership model, borrow checker is good for memory safety but can be complex to think and implement which is critical for new developers. This makes Rust's learning curve a bit steeper with some obvious limitations.
These are the obvious limitations that comes with Rust but that not make it a bad language . Rust is popular for some serious reasons and will grow even more in near future.
Being Rusty is Still Classy...!
Are you learning 'Rust' then...?? or you sticking with 'stainless steel' languages..??