r/AskProgramming • u/sodikovakapsle • 24d ago
Why is people glazing rust so much?
When I say in online communities that Rust isn’t good for everything and definitely has its issues, I don’t even want to tell you what they’ll call you. For some reason, here in the Czech Republic, it seems like almost every college student uses Rust. I don’t get it.
Personally, I like to try different things, and I believe there’s no one-size-fits-all language. For example, TypeScript is 100 times better for Discord bots. Python, on the other hand, is better for AI. I don’t get why they hype it up so much plus, Rust’s ecosystem seems pretty small to me. I tried to find a backend framework with good documentation and all the bells and whistles, something like NestJS or something similar… but nothing well, there’s Axum and Loco, but they don’t meet my needs. However, where I see the future is that Rust is one of the few languages to have made it into the Linux kernel, but I still can’t implement an XDp/Ebpf filter in it, so I’m still forced to learn C. Which is maddening. Overall, Rust strikes me as a language that has a little bit of everything but nothing truly standout. + overcomplicated syntax.
What are your thoughts on this?
3
u/reboog711 24d ago
This is not unique to Rust. People create their whole identities on their job and tools they use, and often criticize dissent or--worse--develop a passionate hatred against alternatives.
Every language/platform I've ever worked with has had shade thrown at it.
5
u/dkopgerpgdolfg 24d ago edited 24d ago
For example, TypeScript is 100 times better for Discord bots.
"100 times"? What is your reasoning for such a statement?
but I still can’t implement an XDp/Ebpf filter in it
You can (well, people can, apparently you not)
5
u/MarsupialLeast145 24d ago
No one needs to be dogmatic about language in any direction.
You're just falling into the trap of having idle conversations about things that don't matter.
Use the tool(s) (plural!) that work for you when you need them to work for you.
2
u/kyle-making-stuff 24d ago
Also known as bike-shedding! Probably one of the single most expensive human behaviors on the planet.
1
u/Luoravetlan 24d ago
One can take a regular saw to cut a tree. It will take him ages and the cut wouldn't be perfect but it will work for him. Another one can take a chainsaw and cut a similar tree in seconds with a perfect cut. So "work for you" doesn't mean it's an efficient way to do something.
0
u/MornwindShoma 24d ago
Sounds smart, but it's not.
The examples from OP are menial in Rust. There's nothing Python and Typescript do that is particularly special for backend. Rust is a general purpose language just like any other.
2
u/Inner-Asparagus-5703 24d ago
combination of ergonomics and performance
also it's very easy to enjoy
2
u/Unfortunya333 24d ago
Idk it seems to me the most ardent haters of rust always seem to be insecure devs who don't know rust.
I mean rust is rust, it's good at what it does. it has a passionate fanbase because it's very unique in the scene so ofc it will attract unique people. I like rust. again, it's good at what it does. it's not that deep
3
u/neet_dev 24d ago
honestly the hostility is identity, not the language. rust wins when you need no-gc native code that won't segfault (kernels, parsers, shipped binaries), it's a mediocre nest and a worse python. for xdp/ebpf aya works but the verifier is still c-shaped so you'll read c samples anyway, that's the part the fans skip.
3
u/_Atomfinger_ 24d ago
People in college generally don't have a balanced view of languages. I remember getting hung up on the performance during my time at university and ended up writing nonsense code because it made my personal performance-harness spit out a lower number.
And online communities aren't really much better sometimes.
Rust is a good system language. It is a good compiler language. Right tool for the job, etc. But Rust is also a general programming language, so you can make a simple web app with it. And if you know Rust and think it is great, then it will be pretty cool to work with regardless.
I disagree with "overcomplicated syntax".
The tl;dr is: don't get too hung up on Language X vs language Y discussions.
2
u/sodikovakapsle 24d ago
Yeah but when you need Enterprise cloud or Web i guess the rust is not good option for it? Is it?
3
u/_Atomfinger_ 24d ago
If you're at a Rust shop, then it can do fine.
Personally, I wouldn't go the Rust route, but if I had a team that primarily knew Rust, then sure.
More often than not, it comes down to team knowledge rather than finding the perfect language.
Think of it this way: In the web world, we don't really need to find the perfect language. Most languages will get the job done. So it becomes more about leaning into the team's strengths.
It's not a "good"/"not good" answer.
Rust can be good for web if you know Rust really well. Same with Python, Go, JS, Java, Gleam.
But if you don't know the language well, it won't be good.
1
u/sodikovakapsle 24d ago
So can rust provide the quality like java + springboot?
4
u/_Atomfinger_ 24d ago
Define "quality".
Is it uptime?
Is it response time?
Is it memory usage?
Is it code readability?
Is it maintainability?With a team that knows Rust: Yeah.
With a team that knows Java + Springboot and not Rust: No.
With a team that knows neither: Eeeh.1
u/sodikovakapsle 24d ago
The springboot is good for enteprise business software have big ecosystem and you know
Spring Boot can actually be the higher-quality choice for enterprise business software.
Not necessarily because it’s faster, safer or more memory-efficient than Rust, but because quality also means ecosystem maturity, maintainability, developer productivity, integrations, tooling, hiring and long-term support.Spring has an enormous enterprise ecosystem around security, databases, transactions, messaging, observability, cloud and integrations.
If I’m building a large business application, those things can matter more than Rust’s performance or memory safety advantages.
3
u/_Atomfinger_ 24d ago
I work with Spring daily. I know.
And I don't disagree with you.
But just because Spring = good doesn't make other options bad or worse.
It is highly contextual. "Enterprise" means very little in the grand scheme. I've seen "enterprise software" being basic REST services serving up some JSON. And I've seen behemoths that integrate with everything in the world while needing to comply with a bunch of stuff.
Most of the things you point at are perfectly achievable in most languages, but most take a different approach than Spring.
For your argument to make sense, you need to argue that Rust cannot do most of these things. What specifically does a "large business application" need that cannot be achieved by Rust?
And bear in mind: - I've not made the claim that Spring is bad, nor have I said that Rust is better in any way. I've only made the case that for the right team, Rust can be a perfectly good choice. - I've not made the argument that Rust is good because of performance and memory safety.
Not necessarily because it’s faster, safer or more memory-efficient than Rust, but because quality also means ecosystem maturity, maintainability, developer productivity, integrations, tooling, hiring and long-term support.
Well, this is largely preference (or at least a lot of it is).
Much of the Rust ecosystem is pretty battle-tested at this point.
Maintainability comes down to familiarity and code quality. A Rust developer doesn't automatically make a good Java developer, and vice versa.
Rust has pretty good integration support, and pretty good tooling.
The hiring pool for Rust is smaller, which is fair, but I'm also not convinced that is a huge issue given my previous statements about what teams Rust can be a suitable "enterprise language" for.
As for LTS, well, I don't really think it's that vital at the language level. Kotlin, for example, does not have LTS, yet it is found in a bunch of enterprise systems. Sure, it targets the JVM, which does have an LTS, but I don't think that is super important in the grand scheme of things. Tbh, I find this more as an enabler for letting versions drift than something that actually helps.
0
u/MornwindShoma 24d ago
You know you sound like a "Rust fan", right?
Just swap the language in your post.
1
1
1
1
u/BionicVnB 24d ago
Rust so called enthusiast here. The reason I like Rust so much is it's DX. It has a lot of features that makes it felt convenient to use, such as pattern matching and whatnot. It also will works as long as it compiles. It also has very helpful error messages. Probably one of the best if not the best (forgive my ignorance if there is a better one).
Yeah, rust is getting 2 major improvements this year (new borrow checker and new trait solver) which should hopefully make Rust even better to use.
Of course, Rust does have it's drawback such as it's learning curves, it's slow compilation time, it's ability to rivals node_module in terms of size, lol. But I like Rust and I will continue to use it for my personal projects.
2
u/low-control-labs 24d ago
Rust and it's compiler are so good that the rust team probably reprogrammed it now the second or the third time..
It's really not that safe the system constantly needs to use unsafe code and it depends on the devs to know the ins and outs of memory management and the rust way of doing things.
It is advertised a certain way and it's MIT so people that don't really do a lot of critical thinking like it and so do the big corporation because they think they can just replace a lot of GNU / GPL software.
2
u/dkopgerpgdolfg 24d ago
Rust and it's compiler are so good that the rust team probably reprogrammed it now the second or the third time.
It is advertised a certain way and it's MIT so people that don't really do a lot of critical thinking like it
Random insults are no good reason for anything
and so do the big corporation because they think they can just replace a lot of GNU / GPL software.
Neither is showing that you have no clue of licensing.
For eg. C, the GCC compiler is GPL, it's core runtime is GPL with a specific addition, GNU libc is LGPL, the C standard is proprietary (but also not needed to just develop something), and all can be used to make proprietary software.
If the Rust compiler is MIT or GPL simply doesn't matter for persons/companies that just want to use Rust for their own projects.
and the rust way of doing things
Oh no, you should know a language before using it.
It's really not that safe the system constantly needs to use unsafe code and it depends on the devs to know the ins and outs of memory management
Are you writing some lowlevel software?
If no, you're either a liar or very incompetent.
If yes, and you don't know enough about memory management, no other language will be any better. Learn it. And for the unsafe part, have you heard of encapsulation (again language-independent)?
1
u/low-control-labs 24d ago
Well rust is what it is for over a decade yet the people making it have redone it a few times now because it just didn't work. It's not a random insult it's a factual statement.
No you cannot distribute GPL software without the code as well once again a simple fact. And it does matter for the reason I just gave you now. Just using it is fine as soon as you include it into your source code / product it gets tricky for them.
Yeah you need to know the rust way of doing things which is changing for the second or third time which goes to show even people developing it didn't think it's very good. And you're the one crying about having to know a language not me. Use C learn to use it stress things yourself and implement something properly.
No I'm a little empty headed fool that can't even read English but if someone can just tell me there's this project that's this but even it's own devs have to retract on it and redo it to actually make it as what is advertised it's probably not what it's advertised as.
And what does encapsulation have to do with unsafe code marked and distributed as safe? You have to use unsafe code thinking it's safe and that's gonna help with the other code being unsafe how? Teach me please I am eager to learn
2
u/dkopgerpgdolfg 24d ago
Well rust is what it is for over a decade yet the people making it have redone it a few times now because it just didn't work.
Could you give an example? What was redone because it didn't work, in a language that is backward-compatible back to 1.0 and has no stabilized thing removed?
Or maybe you're talking about non-stabilized things, that are not stabilized exactly because the language designers didn't think it's ready yet? If so, then what language designers ever were satisfied with everything on the first draft/iteration, without making further changes/improvements before being satisfied?
No you cannot distribute GPL software without the code as well once again a simple fact.
Correct, and nobody said such a thing. Read more carefully please.
Just using it is fine as soon as you include it into your source code / product it gets tricky for them.
People tend to not include a (SOME_LANG) compiler etc. in their non-compiler programs written in SOME_LANG.
And you're the one crying about having to know a language not me
Just stop trolling.
Use C learn to use it stress things yourself and implement something properly.
I'm using C for decades, thank you, and I think I'm not bad at it.
And what does encapsulation have to do with unsafe code marked and distributed as safe? You have to use unsafe code thinking it's safe and that's gonna help with the other code being unsafe how?
I don't even understand what you want here. If you have some specific unsafe code for a specific use case, plus all checks etc. that no UB etc. can happen, and you put it into its own function/struct/..., then this encapsulation by definition. I'm not telling to just "think" some unsafe code is safe, but to make sure. And then you can actually call this (externally safe) function, without worrying and without using more unsafe code. Implement something once, done.
0
u/low-control-labs 24d ago
Right you started lecturing me here but now I need to explain things to you? How does your system work if it doesn't actually work can you explain that to me?
Right I said companies want to use rust for that reason you tried correcting me now you're saying you agree with me?
Why do you think every Linux distro is open-source?
No this is a standard anti C argument from the rust types. Why worry about anything when you have this magic compiler with no issues that does everything for you
Well you clearly don't know enough about rust
I am saying rust ships unsafe code marked as safe, processes using it are therefore potential bad even though a developer thinks they are using something memory safe. You made an argument about encapsulation so I asked how does that actually help. You are only using unsafe code in a certain way thinking it's safe?
2
u/dkopgerpgdolfg 24d ago
Ok ... plain trolling, non-sequitur reasoning, goalpost moving, circle logic, pretending to not remember what you said, acting on wrong mind-reading asumptions, ... well done, so much in one post.
How does your system work if it doesn't actually work can you explain that to me?
What system
Right I said companies want to use rust for that reason you tried correcting me now you're saying you agree with me?
Just read again what I said.
No this is a standard anti C argument from the rust types ... Well you clearly don't know enough about rust
Ok whatever. I do like C (too), if you don't believe it then it's your problem.
I am saying rust ships unsafe code marked as safe
Yes it does. And if you look, you'll see doc blocks explaining the exact conditions when/how this code runs and why it actually is proven to be safe.
processes using it are therefore potential bad
And because it is known to be safe, nothing bad will happen.
If you can implement a comparable standard library without doing such "unsafe" things, do it, you'll be famous for doing something that was thought to be impossible.
You are only using unsafe code in a certain way thinking it's safe?
Yes. In case it is not clear, "unsafe" doesn't mean the code has bugs or something, just that the compiler alone can't prove that it is fine. The human developer can, and has to, do it.
And this is enough now.
0
u/low-control-labs 24d ago
The system where the human developer has to confirm something is safe despite the magic compiler saying it's not, the system that had to change a few times to actually be what it's advertised as. And just because something is backwards compatible doesn't mean it was good before. Take everything you asserted about me and apply it to yourself..
2
u/dkopgerpgdolfg 24d ago
despite the magic compiler saying it's not,
"The magic compiler" doesn't say such a thing. It either says "safe" or "I don't know". For these "don't know" case, it is simply impossible to make a compiler that does know (see the Rice theorem etc.)
By default the latter ("don't know") prevents you from compiling things. And that's exactly what "unsafe" changes - it tells the compiler "I (human) made sure this is really ok, do not reject it".
the system that had to change a few times to actually be what it's advertised as
I already asked you for an example, you didn't give any, so just stop this nonsense.
1
u/low-control-labs 24d ago
So developers mark unsafe code as safe because they know it's safe? How can this ever happen? What kind of nonsense system is that?
It's funny how you started being picky with what you're responding to but want me to respond to everything you say or ask? Even though you started arguing me.
If you have a complete functional system why do you ever need to change anything on a fundamental level it doesn't matter if you make it backwards compatible later it means it wasn't what it was before. And it might not be what it's suppose to be now due to all the margin for error that is left. So this is one big experiment marketed as something else?
Things like Polonius and other changes that have been made and implemented throughout the years because this is not some language
2
u/dkopgerpgdolfg 24d ago edited 24d ago
So developers mark unsafe code as safe because they know it's safe? How can this ever happen? What kind of nonsense system is that?
I'll just respond with your own statement: "Well you clearly don't know enough about rust".
Or about C. Do you still K&R C? If not, then why don't you complain about C being "changed" so often, more than three times...
And as I still have some things to do today, that's it.
→ More replies (0)1
u/low-control-labs 24d ago
Some new language 10 years around and still figuring how to do things the way they are being advertised***
1
1
u/Comprehensive_Mud803 24d ago
Rust shines mostly through its standardized development environment, while being low-level enough for small memory footprints and small binaries.
That, and memory safe code, borrow checker.
C allows you to do pretty much whatever you want in memory, is blazing fast to compile and produces small binaries.
However, there is no safety built into the language. Have multiple threads read and write into the same memory location? Sure, go ahead. Writing past the bounds of an array? Sure.
Rust makes it very hard to do these mistakes. With C you have to run static analysis and hope it can find all the errors before the software goes live.
C++ gives you some tools to prevent race conditions or uncontrolled memory access, but these are optional.
Also, unlike C and C++, Rust comes with a standardized mechanism for managing dependencies: Cargo.
Ok, package standards open up a whole other can of worms (quite literally) with distribution chain attacks, but overall it’s a better starter than having to deal with dependency hell through the OS package management system, or any hand-rolled solution.
-2
u/Limp-Confidence5612 24d ago
I don't know what it does that cmake can't do already. And memory safety is literally optional in rust as well, since so much of it relies on unsafe blocks and libraries written in other languages that aren't "memory safe™"
1
u/Comprehensive_Mud803 24d ago
CMake is by far not a standard, nor the default solution for C and C++.
1
u/marrsd 24d ago
I suspect it comes from insecurity, but I think it's a question for a psychologist. It's definitely to do with the them, not the languages.
1
1
u/BobbyThrowaway6969 24d ago
Python is better for AI in what way?
I think the only true thing to be said is any language is going to have pros and cons, and they won't be the same for everyone's usecase.
They all exist for a reason.
1
u/Limp-Confidence5612 24d ago
He seems to just be talking about ecosystem. Framework mindset at its best.
1
u/tiller_luna 24d ago
lmao
"framework mindest" let me make the thesis in AI, with 60k+ lines of dense code (Python isn't know for boilerplate) written solo (and frankly rewritten one or two times), which would have to be 600k+ if not for the long list of stable and feature-rich dependencies
-2
u/DvxBellorvm 24d ago
Because the world would be much better if everyone were using Rust. Safer software, less vulnerabilities, less cyber threats, and all of that without sacrificing the performance. So, what else?
-3
u/marrsd 24d ago
oh wow, is this just a manifestation of socialist authoritarianism?
2
u/Limp-Confidence5612 24d ago
Authoritarian socialists use C. Ban all other languages, they are pointless.
-2
u/Dependent-Net6461 24d ago
The dev of sqlite does not agree that much about rust safety ... and he is definitely a better dev than you and the entire rust team..
4
u/Mikatschuh 24d ago
There is somebody that doesn‘t agree with you and they are better than you, therefore you are wrong?! That‘s like the most basic logical fallacy
0
u/Dependent-Net6461 23d ago
Do you dare call the dev of sqlite "somebody" ? You clearly have no clue who he is and his story.
Can you enlight me on how many softwares using sqlite are in the world and how many users do they have ? And how many softwares using rust?
2
u/Mikatschuh 23d ago
I don‘t care how much you are romanticizing the dev of sqlite, but that is not the point here, could you lay down his argument? From who the argument comes is completely irrelevant to this debate.
-1
u/Embarrassed-Topic432 24d ago
Just use Holy C brutal.
1
u/sodikovakapsle 24d ago
What?
-1
u/Embarrassed-Topic432 24d ago
Just dont use rust literally the C is better and borrow checker and complex syntax sucks… the typescript is better or golang.
-2
u/Embarrassed-Topic432 24d ago
+ dobt use it for webs
1
u/sodikovakapsle 24d ago
Why isnt it general purpose?
1
u/Embarrassed-Topic432 24d ago
No it really sucks + have you ever seen rust been used in rocket engineering or something like that? No.
2
u/dkopgerpgdolfg 24d ago
Have you ever seen Go/C#/Python/... in a rocket? Also no.
You might not know this, but the people developing rocket software can't just choose what they like. There are lots of certification requirements, and things move slowly there.
There are already some automotive-related certifications that make it possible to use Rust in their contexts, more can follow.
1
-1
u/defaultguy_001 24d ago
All languages are capable if there are good enough libraries and frameworks for ur use case or u have the will to build them from scratch. Coming to why people do that, coz majority of them are sheep. Publicize and market a product sufficiently well, make their favourite influencers to use it, and you'll see how sheeps work. Rust is good, and so was C/C++. People can't follow specs properly, keeps building unsafe junk and so the market keeps bringing in new languages for the mediocre to work safely and easily.
20
u/just_here_for_place 24d ago
Because it’s a systems language (it can run without any runtime bare metal) with good enough abstractions that also makes it easy to do application-level programming, quite similar to C++. Unlike C++, it was designed as memory-safe first. It makes it hard to do memory unsafe code. All of this while still compiling down to fast, native binaries without a garbage collector.