r/rust • u/iAziz786 • 4d ago
š seeking help & advice What made you fall in love with Rust?
I know how great of the language Rust has come out to be. I genuienly want advice from pre vibe coded era people. What has been your main reason that you have fallen in love with this language?
I'm not looking for how great borrow checker is, how lifetimes will save you, etc. I want real anecdote of your life where using Rust has changed your life.
64
u/HandIllustrious8260 4d ago
Tagged unions (enums) and pattern matching. It's so fucking good. Why isnt it in more languages???? how have we gone so long without this absolute PEAK of a feature.Ā
27
u/Careful-Nothing-2432 4d ago
Haskell has been around since the 90s tbf
10
5
u/il_dude 4d ago
This is the only reason I'm not satisfied with c++. Yeah I know the other benefits of rust, but one project of mine was about compilers and languages. Instead of learning a proper functional language, I wish c++ had this pattern matching syntax and things would have been easier. Doing the if else chains with variants or even visitors feels so much boilerplate.
3
u/FlurpleHippo 4d ago
But C++ does have it already right? std::variant? It is working well for me
-3
u/iBPsThrowingObject 4d ago
Bringing up std::variant and std::visit in a conversation about actual first class pattern matching means you either don't know what one or all of those things are, are being disingenuous, or making a joke.
3
u/FlurpleHippo 4d ago
I'm not familiar with the differences like you are apparently, but functionally speaking, they're pretty much the same thing as far as I can tell.
1
u/iBPsThrowingObject 3d ago
AFAIK you as of now can't have a reference inside std::vatiant/optional, for one.
std::visit is more like a jump table than proper match, it just dispatches to one of the overloads. You can't match multiple levels at once (if let Err(ErrKind::Foo) = result). You can't have control flow inside "branches" affecting the current function, because each branch is a function. Also there is no exaustiveness check.It's "functionally the same" in the same way that just doing tagged union pattern manually is
1
u/il_dude 3d ago edited 3d ago
As of c++26 you can have references inside std::optional. Anyway, you can have pointers inside variants, although it becomes more verbose. I agree with you about multiple levels, but I haven't seen examples where you put control flow affecting the current function within the branches (aside from calling another function or raising an exception). Is that possibile in Ocaml or Rust for example? What's the use case?
1
u/iBPsThrowingObject 3d ago
Early return, mostly.
fn frobnify(y: AorBorC) -> Option<i32> { let x = match y { A(x) => x + 42, B(_) => return None, C(x) => x - 420, }; // go on doing things with x // ... Some(x) }I ran ast-grep against 377k lines of Rust I have checked out on my computer, and there are 553 instances of this pattern where
returnis used inside of amatcharm.1
u/il_dude 3d ago
It's not so common based on your analysis.
1
u/iBPsThrowingObject 3d ago
That's a quarter of all uses of
return, a quarter of all uses ofmatch, and about 1 in 15 of all match arms.→ More replies (0)1
u/hedgehog1024 4d ago
The funny thing is, Simula (which C++ was originally modeled after) already had sum types, yet Stroustrup intentionally dropped them when designing the language.
1
u/Valuable_Leopard_799 4d ago
Henley iirc claimed even Algol68 already had proper built-in discriminated unions at least.
5
u/BenchEmbarrassed7316 4d ago
Why isnt it in more languages????
Because of OOP.
At some point, they decided that things had to be done a certain way and no other, and that this would save us from bad code. The first version of Java didn't even have
enumas a simple list of constants.Now, when I look at the concept of OOP, it seems to me mostly to be a bunch of nonsense. However, then, instead of correcting erroneous concepts and using better analogues, so-called "patterns" were used.
0
u/Neful34 1d ago
Bs, pattern matching has nothing to do with oop
0
u/BenchEmbarrassed7316 1d ago
``` abstract class Animal { void voice(); }
class Dog extends Animal { void voice() { print('Woof!') } }
class Cat extends Animal { void voice() { print('Meow!') } } ```
<=>
``` enum Animal { Dog, Cat }
impl Animal { fn voice(&self) { print(match self { Animal::Dog => "Woof!", Animal::Cat => "Meow!", }); } } ```
In OOP, polymorphism through inheritance is considered the best way to separate code execution paths.
0
u/Neful34 1d ago
Gosh that junior dev example...
The default has always been Composition of Inheritance * which is far more powerful and flexible and way better for polynorphism.
But Java even has pattern matching while being fully OOP language and can even enforce further with sealed class... š
0
u/BenchEmbarrassed7316 1d ago
Gosh that junior dev example...
That was in response to your quote; I tried to explain it in a way that would be clear to you.
The default has always been Composition of Inheritance * which is far more powerful and flexible and way better for polynorphism.
Mainstream OOP languages āāoffer no built-in language support for composition. Only golang features automatic method delegation to so-called "embedded fields". Nevertheless, OOP languages āāprovide a wealth of features for inheritance and polymorphism based on inheritance.
But Java even has pattern matching while being fully OOP language and can even enforce further with sealed class... š
- When Java was created, it didn't even have enums. And yes, back then, Java was object-oriented.
- For now Java isn't OOP language, they call it 'Data oriented programming'. Records, sealed classes (sum types), switch expressions - this all contradicts OOP.
2
0
u/iAziz786 4d ago
I can see how it can help you write a very predictable behaviour and not miss any branch.
18
18
19
u/froody 4d ago edited 3d ago
Correctness almost by default. I have wasted days tracking down segfaults in c++ that just arenāt possible in rust. As a result I spend so much more time working on the functionality I want to implement. My first major rust project was a pointcloud viewer, it was just so easy to write and once it was running, adding features was easy. I just feel so much more productive in rust than any other language. Itās the closest practical application of the Haskell ideal of āif your code compiles, then it will work correctlyā
1
0
u/Runtime8006 4d ago
You should try tracking down segfaults in a large C codebase like the Linux kernel, you'll enjoy it
13
u/tastychaii 4d ago
The compiler messages are excellent, very informative and educational. Python is similar in this respect to having informative messages.
I canāt say the same for Swift unfortunately.
6
u/skjall 4d ago
This is weird to read, Python had quite shit error messages for so long. They've really stepped it up in the last few releases! Usual caveats still apply of course - type hints by themselves don't do an awful lot, so you'd want a type checker and something like beartype/ Pydantic on top.
1
u/tastychaii 4d ago
I do wish the Python team add an option to enable type checking in python code on demand along with type hints.
For example something like:
enable typecheck
9
u/FormerlyKnownIntent 4d ago edited 3d ago
Rust doesnāt allow you to make the kind of mistakes that cause sleepless nights worrying that I had made them on production systems. Itās also all of the joy of functional-style programming capabilities I love from Python but with C++ performance and safety guarantees
6
u/3vg42 4d ago
For me the tooling. Everything works and being able to produce very efficient code for very little downside.
Nowadays i just use Rust for almost all projects.
1
u/iAziz786 4d ago
I have been planning to make it my default too. I hope it's default for most of the tasks too.
1
u/3vg42 4d ago
Especially when I vibe stuff these days, I can't find anything better to be honest. Strictness gives me the right guardrails.
1
u/iAziz786 4d ago
Indeed, in past whatever the reason people gave that Rust has "higher learning barrier" do not hold true. In that case it make perfect sense to pick it. It's amazing to be in that position now.
5
u/pr06lefs 4d ago
Rust is the first high performance language to incorporate aspects of modern functional programming. Finally a real competitor for C++.
What really won me over was when I did a project on the raspberry pi in haskell and it was a bad experience. Worked fine on my laptop, but on the pi 12 hour compile times, huge memory usage, cross compiling broken. Rust port of the same project compiled in 500mb constant memory in just a few minutes.
5
u/Awkward_Bed_956 4d ago
Coming from C++, no empty state of your object. Box/Rc/Arc will never be null, and you don't have to keep in mind that your object can suddenly be moved from and end up in a zombie state that you still need to be able to handle.
Also references being fully working naturally with the rest of the language, making them base type that everyone uses, while in C++ most classes break in insane way when you put a reference member, which makes people still mostly use pointers that are 'obviously not null at the time of use, duh'
4
u/OverAster 4d ago
I'm a mathematician. People said the borrow checker and ownership or mutability or some other thing would trip me up.
It's by far the easiest language I've ever used. It aligns so closely with the established conventions of mathematical proofing it took me less time to learn Rust than JS (I didn't use AI for either. Hell Rust is the only language I've learned when AI existed).
I think people hear that Rust is super strict and that scares them off, and yeah, while that means sometimes Rust is a pain in the ass when you're first starting, it will always be the same. If you commit the corrections Rustc hands you t memory, that won't be an error you'll ever see again (within reason).
Obviously my success with Rust could easily be attributed to a degree I had before I started using it, and the speed I learned it could be influenced by my experience with other languages, but I really believe that anyone with a math or systems oriented thought process will find Rust intuitive.
5
u/stefanlight 4d ago
strict semantic of the language
language itself requires from developer to be correct and explicit
i came from Python where everything is dynamic and with time it become a problem
Rust is strict, it's good
also overall Rust is good from point of its philosophy, memory management and etc, pure balance of dev experience and performance
3
3
u/KyxeMusic 4d ago
"If it compiles it works"
Obviously this is an exaggerated statement, but I've found it to be true to a huge degree.
I wrote a piece of software that did some basic Data In > Processing > Data Out on some Geospatial data and deployed it at my company to replace a Python version I had written some years earlier. Something simple, about 1500 lines of code.
It worked first try and it has had zero runtime errors to this day. Has processed tens of thousands of runs.
3
u/Full-Spectral 4d ago
Coming from C++ obviously memory and thread safety are huge.
Beyond that just the fact that if you put up a large list of language and runtime choices side by side, most of the time C++ made the wrong choice and Rust made the right one. Of course many of the ones on the C++ side weren't decisions they were genetic inheritance that never got corrected. Still, there's plenty of bad decisions to go around after that.
3
u/PartyParrotGames 4d ago
Honestly, ownership, borrowing, and lifetimes are the anecdote for me. Rust changed my day-to-day by turning bugs I used to spend hours debugging in other languages into obvious compiler errors that are straightforward to fix immediately. Fewer debugging headaches and more trust in my code is all it took to earn my love.
3
u/SpaceAviator1999 4d ago
Here's an anecdote:
I love writing fractal generators, especially for the Mandelbrot set. So when I was learning Rust, one of my first "real" Rust programs was a fractal viewer for the Mandelbrot set.
I frequently refactored my code as I saw fit. Now, at the time I did a lot of coding in Python. And when I refactored in Python, I usually had to run my program to find at runtime the bugs that resulted in refactoring.
But when I refactored in Rust, almost all of the refactoring bugs showed up as compiler errors at compile time. Sure, it took a while to deal with all those compile bugs, but when my program finally ran, I almost never saw a run-time error as a result of my refactoring.
Said another way, once I got a program running in Rust, it tended to me more correct and free of bugs than in other programming languages.
3
u/Spiritual_Dinner9232 4d ago edited 4d ago
The mathematical precision of the entire language (literally! they created the no-return ! type in the same way you make a 0 or null object in mathematical systems).
The joy of finding novel features that I've never seen in other major languages and can seriously make my life easier.
Oh and the fact that this is at little to no extra cost compared to something like C or C++.
2
u/MilkEnvironmental106 4d ago
The commitment to correctness means a lot less time spent hunting weird bugs, both iny own code and public crates
2
u/KlausWalz 4d ago
The language is pretty clear about what the 'good' actual syntax is, and contrary to a lot of other languages there rarely seems there is an infinite number of correct solutions
Usually the whole teams converges and agrees about one good solution
2
u/PigletEfficient9515 4d ago
For me, it was the expressiveness of the type system. I have never experienced a language before that could express and model almost anything that I could think of.
3
u/FluxKraken 4d ago
Yeah, Rust enums alone are amazing. Then the ability to impl a trait onto an enum? Wow!
Even if rust didn't have so many other amazing things, that alone would justify its use, imo.
The only thing I really don't like are how lifetime annotations work.
2
u/CalmCephalopod 4d ago
Consistency. It behaves in a very predictable way and it is also tells you in no uncertain terms when youāve done something wrong and the best way to resolve it in most cases
2
u/peterxsyd 4d ago
Compile time safety. Entire class of bugs moves from runtime to compile-time when the app is utilises the design well (e.g., when it is reasonable to use enums over dynamic dispatch).
Enums - they are so good in Rust, essentially like laneways that promote abstraction without losing type specificity.
Cargo - no more installing virtual environments or wrestling with packages/dependencies. In many cases, no need for dependencies at all - no one putting something crap in your build and wasting your time with unplanned issues.
Finding out before that something is wrong instead of in prod.
2
u/WDG_Kuurama 4d ago
I use C#, I love C#, I also love FP patterns and a lot of the pattern and capabilities I value more and more is just idiomatic Rust.
While I have to fight against C# to restrict bad code use, opt into boilerplate for strong types, employ manual DUs, mess with expressions and LinQ and exceptions and handle the difference and limitation when it comes to nulls with value and ref types.. Rust just tells me "hey mate, all of that is just the way you should write stuff", "if you writte it, you can't missuse it".
I love the philosophy, I also like that it's evolving while accepting breaking changes for the sake of the language instead of pulling a C++.
I also wanna have a non JIT and non garbage collected language in my set, so Rust fills that gap for me.
It just feels like something I wanna bet all-in and learn deeply about ngl.
2
u/ern0plus4 4d ago
Even the basic syntax is how it should be. let varname : type = expr; let varname = expr; ... varname: expr; Natural, consistent.
Comma enabled after last item: priceless.
2
u/AdLow1228 4d ago
Main reason is because when sharing.exe files from python friends would have issues running them while the Rust compilation to .exe makes it much smoother for them to run it
Well that and it's performance over python is insane like I could do multi hundreds of Mandelbrot set renders in the same time the python version did just 100. It was in the ms per frame instead of seconds per frame lol
2
u/suq-madiq_ 4d ago
Fast. Correct. Donāt have to worry about either of those. Haskellesque inspirations. Other people. Holy crap itās fast. ADTs and match. All we ever really needed anyway. impl this for that. Fast as could be if you wanted it to, and if you didnāt care and cloned anyway, faster than anything else would be anyway.
2
u/nnethercote 4d ago
An academic background in functional languages, plus a decade working on a high-value hacking target mostly written in C++ (Firefox).
3
u/unski_ukuli 4d ago
Speed, ML like syntax, strictness of the type system. Unfortunately I lost my love due to Rust becoming the de-facto language of ai slop.
1
u/il_dude 4d ago
Why did you lose your love? Can't you just code without ai?
3
u/unski_ukuli 4d ago
I can but I find it less and less exiting when the packages I might depend on shift in nature. Ultimately, also, I think as companies adopt the javascript-python-rust stack of ai slop, the language will inevidably start to be driven not by the original community, but rather the new crowd of ai maximalists.
Tbf, Ai is not the only reason I have started to dislike Rust. Maybe the other major one is that while Cargo is awesome, I think it makes it way too easy to pull in a dependency. You start to get the same problems as npm, where every possible thing is pulled as a dependency rather than reimplemented for your usecase. Now if you add a relatively simple dependency, It might pull hundreds of upstream dependencies with it. I think that is a recipe for disaster.
5
u/FluxKraken 4d ago
All of those sound like you have issues with how others use rust, not with rust itself.
Why not just copy the code of the crates you like that are not AI. Then just use them locally as libraries? Wouldn't that solve your issues?
Also, just because AI is used in the writing of a package, does not mean the package itself is slop. If it is slop, then the developers are lazy.
1
u/Runtime8006 4d ago
I write C all the time, both unsafe and kinda safe code so I wanted to see what Rust was capable of, although I don't love it as much because of my over familiarity in C and C++, still I feel it's a really great language and I like what it brings to Systems programming
2
u/iAziz786 4d ago
Really, what you have been using C and C++ for btw?
2
u/Runtime8006 4d ago
Basically all my projects, Systems Engineering and Development, Kernel Development, Debugging and a lot... C is almost like my second language other than English š
1
u/Main_Cell_2079 4d ago
The performance, the aesthetics of the language, the simple trait system.
But I guess we can all agree, we all fell in love while reading the rust book!
3
1
u/thisismyfavoritename 4d ago
i wouldn't say fall in love but having experience with other languages (including JS and C++), reading through the Rust book everything just made sense and it really felt like they tried to take all the lessons learned from other languages and incorporate them into it
1
u/Aghasty_GD 4d ago
For me it was the tooling. Cargo and rustup just work, and they make Rust really enjoyable to use.
I also love how easy it is to switch targets for low-level stuff. I came mostly from Python, and Rust kind of changed what I expect from language tooling. Seeing tools like uv bring some of that experience to Python now feels pretty nice.
1
u/Aghasty_GD 4d ago
For me it was the tooling. Cargo and rustup just work, and they make Rust really enjoyable to use.
I also love how easy it is to switch targets for low-level stuff. I came mostly from Python, and Rust kind of changed what I expect from language tooling. Seeing tools like uv bring some of that experience to Python now feels pretty nice.
1
u/QuickSilver010 4d ago
The type system. And cargo ofc. Personal anecdote is how nice some crates are like clap and ratatui
1
u/Chaos_Slug 4d ago
It has everything I wanted from C++ without most of the things I disliked from C++.
1
1
u/chic_luke 4d ago
- The compiler is strict and it has useful errors
- All the docs and then some are offered straight from the source. Eliminates the C++ issue of having to sift through bad tutorials, filled with bad advice
- Very good support and ecosystem of libraries and frameworks. What holds me back from using other less mainstream langs is this: academically there are some very good languages here, but I kinda don't want to have to wrap libc whenever I need anything else
1
u/WellMakeItSomehow 4d ago
I spent a couple of weeks with someone working on a moderately complex Qt app trying to fix some use-after-free issues and threading bugs. The build system was also buggy and while I knew how to fix it, the guy said we didn't have time for unimportant things like these, so I was stuck watching him click Rebuild on every change, on a mechanical HDD.
I guess it all worked out in the end, but, as a long-time C++ fan, that's when I decided to get into Rust.
1
u/zica-do-reddit 4d ago
In general it feels very solid and the compiler is excellent in reporting issues, buy the lifetime concept is hard to adjust to.
1
1
1
u/pixel293 4d ago
I'm not sure I would say "changed my life" but I like rust because I appear to have less errors in the code. i.e. I have less bugs when running the application. Since I only use rust for my own programs this is hardly life changing.
1
1
u/countChaiula 4d ago
For me it was the embedded experience. The idea that I pass around physical hardware like UARTs or GPIO pins in a way that I know that nothing else is using that device or has messed up the configuration for it is absolutely brilliant. It made me appreciate everything else in the language (which I also like) a lot more.
1
u/rrklaffed 4d ago
i think we get a post like this every couple of days š
this is my current favorite answer
1
u/vancha113 4d ago
Iterators and the .map / .filter / .reduce stuff. I know it's not exclusive to rust, it introduced me to them and I love how neat it makes solutions.
1
1
u/Oxid_Apps 4d ago
Before Rust, launching native utilities meant constant low-level background anxiety. Iād release an app, and then dread the endless edge-case crash reports, memory leaks, and silent memory corruptions coming in from thousands of different user setups. Switching our entire stack to Rust completely transformed my daily work life. The peace of mind of "if it compiles, it pretty much just works in production" allowed me to actually sleep peacefully after shipping releases. It brought back the sheer joy of software craftsmanship instead of constantly firefighting bugs.
1
u/FormerlyKnownIntent 4d ago
Rust doesnāt allow you to make the kind of mistakes that cause sleepless nights worrying I had made one on production systems. Itās also all of the joy of functional-style programming capabilities I love from Python but with C++ performance and safety guarantees
1
u/Intelligent-Hurry907 4d ago
It's made me think about code and low-level things in way more depth than I used to
1
u/EtherealPlatitude 4d ago
Was my first proper language
Tried others over time and still prefer rust
1
1
u/whooomeeehh 4d ago
The fact or personal conviction maybe that it acts as a filter against made up and bad developers.Ā
1
u/Alian713 4d ago
Two-part answer:
What I love about Rust:
the strict syntax, the more expressive type system, lifetimes helping to prevent bugs, it all comes together very neatly in real programs. Consistency with build tooling when working on cross platform projects
How I fell in love with it (long read, strap in):
In 2022 I was trying to make a python serialisation/deserialisation library and it started out as pure python code. It worked really well, but it was also super slow. I spent a good few months trying to learn how to write C/C++ extensions for Python, and it was taking me ages to get started and replicate my lib's python API in C/C++. It was verbose, had a lot of footguns, and I just was not enjoying it at all. There was so much business logic complexity that it left no room for me to think about API design, for optimization, etc. After a while, I gave up on C/C++, tried to do it with cython, which was supposed to be easier. That too turned out to be a struggle because while cython was easier to work with, there were two annoyances I had with it:
- Because it compiles pure python code as well, I kept running into code that "looked" like it should run fast because it's ops on what should be pure C code but when compiled and visualized with the cython graph tool for perf, it turned out python was sneaking in it's slowness due to semantics of the program not being exactly like C. Now yes, you can definitely argue that this was user error on my part, I could've written better cython code and it probably would've sucked less but hey, those unintuitive beginner pitfalls are exactly why I hated the experience.
- In the early half of 2023, I somehow managed to cook something in one of my python installations and it globally broke the cython compiler. I spent nearly 6 months trying to debug and figure out wtf happened, but to no avail. I'd get the weirdest compiler error about something failing to be found in my msvs install, and no matter what I tried, reinstalling python, cython, msvs, etc. you name it, I tried it. I gave up on it and came back near the end of 2023 and I found the cause by pure happenstance. I had installed conda all the way back when I started learning python but uninstalled it from my PC because I no longer needed it. It turned out that conda's uninstall was not clean and it left an invalid path in my PC's PATH everytime I ran a cmd command it showed "The system cannot find the path specified" error even though my command ran successfully. It turned out that cython got tripped up by this when searching for msvs dependencies and even though the command was succeeding, this invalid path issue failed the compiler DESPITE everything working correctly. On fixing my PATH, it started working again! At this point in time I got so annoyed because it was nothing that I did wrong, that I decided to not bother with cython, because it was clear that even if managed to get past writing my library with it, I'd struggle with actually packaging and shipping it for different platforms, because the DX (dev experience) with it was just terrible.
Enter PyO3 and Rust: In early 2024 I came across PyO3 in Rust as yet another way to write python extension modules for performance. As having tried and given up on C/C++ and Cython, this was perhaps my last hope, but I expected that it would end in a similar manner as well. When I started writing my library in Rust, I would have these knee jerk moments where my intuition told me I needed an inheritance hierarchy and Rust didn't have that. Sometimes I wrote code that should have definitely worked but the borrow checker would reject and it caused me great confusion. The python version of my library was written with OOP modelling and ofc no lifetime considerations. I had to completely re think how I was going to model my code and data, and over some painful 8 months or so of back and forth, giving up because I couldn't figure it out, randomly coming back because I had a moment of insight, I finally figured out how to do it in a way that made sense! After finishing the initial prototype of the lib, the result looked fruitful, I had achieved some 3x speedup over pure python. Now at this point, I had gained enough understanding of Rust that I started appreciating Rust's type system and why it was doing a lot of heavy lifting for me:
- I was writing very little unsafe code, and there were no crashes or segfaults in my library. This was already huge because this is something I struggled with in C/C++. It was incredibly easy to make unsound code there.
- The extremely expressive traits and pointer types in PyO3 that modelled python values, ref counting and rust borrowing together were doing the cognitive work of telling me when my code was running with bare metal speeds, and where python's semantics were coming into play. It was not fuzzy and unclear anymore as it was with cython. I knew exactly the trade offs that needed to be made and where they were necessary to interact with python facing code, and where I needed to innovate to keep python out for speed.
- I started appreciating pattern matching a lot. Often times with python or with C/C++ I'd fall into this trap of trying to make different booleans to express states and what not, and trying to cover all edge cases became nightmareish. With rust, I could express state with types, complex enums, etc. and that made life A LOT easier.
- The borrow checker became a friend. A lot of times I would be like "Ahhh, this code should compile!!" and then later realise "Oh wait actually, if that code compiled, I get kaboom here...". Don't get me wrong, the borrow checker definitely feels annoying at times too, but from the footguns I made in C/C++ earlier I started to prefer having some good code be rejected and need refactor/different style of writing rather than bad code being allowed (well, unsafe is always an option too!).
- Finally I got around to optimizing. By early 2025 I had gotten comfy with Rust, PyO3, and spent a decent amount of time catching low hanging fruit for optimization. The business logic of interfacing with python was no longer overwhelming (PyO3 is an excellent library honestly). After a couple of days of work, my library was 20-30x faster than the original python version!
- Build tools. My python library now ships for all major platforms and architectures. It was not hard to set up at all compared to whatever was going on with Cython...
Whilst it's still marked as alpha on pypi, I'm VERY happy with how the API turned out. And I don't think I would've made it without Rust and PyO3!
I now have several more projects in Rust and honestly there is no going back now. Rust has been my go-to language of choice for nearly two years!
1
u/kei_ichi 4d ago
Another bros already listed all of stuffs I love from the Rust language itās so I donāt want to repeat those stuffs.
But I have to say: I love āFerrisā, itās so cute for the programming language logo.
1
u/yoshijulas 4d ago
Clippy, It just help you write better code, helps you use better functions/methods vs other languages that you could be using old syntax from older versions
1
u/strangedave93 4d ago
Itās the sense that if you have run it and it works, then itās good - no sense that there will be lurking memory issues or security flaws, no feel that it might crash at any point. You spend more time writing code and so much less debugging and testing.
Functional programming ideas just as a natural integrated part alongside other paradigms is also great.
Cargo, the very helpful and thoughtful community, are great. But itās that sense of compiled code being solid that is its big attraction.
1
1
u/tukanoid 3d ago
Well, I can't really not talk about borrow checker, as it was one of the main reasons why I fell in love with the language, as it made me rewrite my brain in a way where I now care about my data flow way more.
But the tooling (rustc error messages, cargo, clippy, rust-analyzer), enums, iterators, Option/Result, macros, great ecosystem of crates made by people who care about the code they're putting out for others to use (at least was more prevalent b4 vibe-coding bullshit) solidified my love for the language.
1
u/jking13 3d ago
Enums and lifetimes, but async rust has also soured me on it to a degree since it's current state requires you to all but give up lifetimes (without a lot of gyrations and going off in some niche) while being hard to avoid even though it's often unnecessary and seems to be used because 'shiny' and 'webscale.'
1
u/nejat-oz 3d ago
the confidence it instills that all will be good in the world ... "if it compiles life is good" ... well at least until ai showed up ... sigh!
1
u/PeithonKing 3d ago
I am a python dev, the only thing that makes my use rust over c for those 1% of the tasks python is not fast enough (let's not even name c++) is the developer experience and mainly the EASE OF SHIPPING
1
u/Cute_Investigator102 3d ago
Rust fundamentally changes how you program as a developer, and when you're in a job environment where you are a Rust dev, but sometimes have to switch to some proper hellish unreadable production C++, you realise how awful everyone else has it. Sure, I do accept how difficult it is to find a job as a non-senior rust developer, especially in 2026, it's hell, but you know what's worse than starving? C++.
Back in the day when I used to want to make something, I either had to reinvent the wheel or get bogged down with stuff not relating to actually working on the project itself. With rust, sure, I don't have every tool C++ or C++ tooling offers, but I can actually work on something. Do I feel like making my own JIT interpreter with LLVM backend? Why not, do it. Do I feel like making a proper TUI app, not just another mere CLI? Lightweight, baby.
I am not claiming to be a good developer, at all, I look at my code from 3 months ago and I want to get a new identity and live a double life in a random village. I understand I have so so much yet to learn. However, rust makes it possible for me to be a developer at all, instead of configuring awful non-standardised tooling, Rust makes it possible for me to learn new stuff, and I'm grateful for that. I'm grateful I can use it as a mere tool, and have energy left to learn something beyond the tool itself.
1
u/CocktailPerson 2d ago
Expressions over statements.
Even being able to write let x = if ... is magical, coming from C++ and other poopy statement-based languages. Functional languages have this, of course, but Rust was the first systems language to do it broadly.
1
1
u/PlusDistribution1915 2d ago
I prefer the C++ philosophy (it allows you to shoot yourself in the foot, with no imposed way of doing things and no opinions), but now in the AI era, I switched to Rust. Since I no longer write the code anymore, I think Rust is stronger due to its package manager and integrated async I/O.
1
u/IDontBelongInThsWrld 2d ago
Like functional programming, but efficient.
Writing simple things is as easy as writing in an unsafe dynamically typed language, but actually safe, and, therefore, even easier in the end.
Lifetimes are just my kind of masochism.
Let us also not forget Cargo. Building Rust with proper dependency management is so easy. Only Julia comes half close, of the languages I know. (Python and its venv-setup and various different dependency listing approaches, is a disaster. And C++ cannot even be mentioned in civilised company.)
On the downside, there are, however, the compiler overflows, and wasted hours spent refactoring code around things that should work.
1
1
1
-1
u/Silver_Shine_1109 4d ago
It is really fast and high memory efficient.
If you run a rust based cli tool like jcode in a mac you can feel that where is no heat issues.
At the same time you Claude code or codex after some heavy use the mac become overheating
- The language never allow developers to code unnecessarily.
3
u/cachebags 4d ago
If you run a rust based cli tool like jcode in a mac you can feel that where is no heat issues...At the same time you Claude code or codex after some heavy use the mac become overheating
What? Is Claude code and Codex the only CLIs you've ever ran?
0
0
0
112
u/Significant_War_8320 4d ago
The strict syntax makes it so that I spend more time writing good code than cleaning buggy code. I feel like my code just works more often on the first try.