337

"Rust's compiler prevents common bugs" So does skill. No offense to you, but, this trope is getting so tiresome. If you like the language then go ahead and use it. What is it with the rust crowd that they have to come acrosslike people trying to convert your religion at your front door?

top 50 comments
sorted by: hot top controversial new old
[-] JackbyDev@programming.dev 5 points 13 hours ago

I can sympathize with some people getting tired of "rewrite it in Rust", especially when it's suggested inappropriately. (Worst I saw was an issue opened on something, maybe a database, I don't remember. Someone said they were a new programmer and wanted to help and only knew a little Rust and that if the project was rewritten in Rust they could help.) But... Rust's compiler being able to do those things is actually super useful and amazing. This is like someone saying they don't need static types because they know the language good enough to not misuse the dynamic types. This is like someone saying they don't need C because they're good at assembly.

While it isn't something as simple as Rust being strictly better than C/C++, it's really silly to say that you being a good developer means you don't need guardrails. Everybody makes mistakes all the time. You're not perfect.

[-] boaratio@lemmy.world 3 points 18 hours ago

At my last job I worked in a code base written in C and it needed to be certified to MISRA level A, and even in a language with as many foot guns as C, it's possible to write safe code. You just need to know what you're doing. I know there are tons of Rust zealots out there claiming it'll solve every last problem, but it turns out you just need to be careful.

[-] xav@programming.dev 1 points 10 hours ago* (last edited 10 hours ago)

it turns out you just need to be careful

Famous last words

[-] hedge_lord@lemmy.world 37 points 1 day ago

Unlike you babies I have Personal Responsibility and I write all of my code directly in assembly the way reagan intended. I don't need guard rails and I've never had any issues with it because my Personal Responsibility keeps me safe

[-] Klear@lemmy.world 11 points 21 hours ago* (last edited 21 hours ago)

Magnetised needle and a steady hand or gtfo

[-] Treczoks@lemmy.world 2 points 22 hours ago

The "common bugs" that the Rust compiler prevents are those a good programmer should not make in the first place. It's the bugs that even evade a seasoned programmer that poses the problems, and there, Rust won't help either.

Remember ADA? A programming language frankesteined by a committee to make programming safer? The programmers using it still produce bugs. And ADA is way more whips and chains than Rust.

[-] beegnyoshi@lemmy.zip 19 points 21 hours ago* (last edited 21 hours ago)

It's the bugs that even evade a seasoned programmer that poses the problems, and there, Rust won't help either

What do you mean these are not the ones that rust tries to fix? Even huge projects like the linux kernel get memory bugs. I don't know anything about ADA and nor do I want to "evangelize rust" but what you're saying sounds boggers.

Obviously rust cannot prevent all bugs or even most of them. It can only prevent a small subset of bugs, but saying that that "small subset of bugs" wouldn't happen to seasoned programmers is just wrong, especially when you have tons of programmers working on the same big project.

I don't mean to say that rust is always the correct choice, but that you're waving off its greatest offering as bicycle training wheels (i.e. something no seasoned programmer would need)

[-] Treczoks@lemmy.world 2 points 21 hours ago

but what you’re saying sounds boggers.

Believe me, it isn't. I program about anything for forty+ years now. I probably have forgotten more programming languages than you can list, and if there are constants in programming, then a) while compilers get better at catching bugs, they never got over the basics, and b) a good programmer will alyways be better at preventing and catching bugs than a compiler.

Once you have aquired a good mindset about disciplined programming, those buglets a compiler (or even code review systems) can find usually don't happen. Be wary of those bugs that evade the seasoned programmer, though...

For the mindset, it is good to read and understand things like the MISRA standard. Stuff like that prevents bugs.

[-] NotANumber@lemmy.dbzer0.com 7 points 19 hours ago* (last edited 19 hours ago)

Man hackers would love you. Memory vulnerabilities are still one of if not the main cause of vulnerabilities in unsafe languages. Yes this even applies to large projects ran by experienced and skilled people like the Linux kernel. Stop thinking your the exception, because I guarantee you aren't but even if you were you can't read all of the code in the world in your lifetime. Nor can you write all the code in the world.

[-] beegnyoshi@lemmy.zip 6 points 21 hours ago

I probably have forgotten more programming languages than you can list, and if there are constants in programming, then a) while compilers get better at catching bugs, they never got over the basics, and b) a good programmer will alyways be better at preventing and catching bugs than a compiler.

I agree with this

Once you have aquired a good mindset about disciplined programming, those buglets a compiler (or even code review systems) can find usually don't happen.

I also agree with this.

I would like to put a lot of emphasis in the usually. It doesn't mean that they don't happen, no human being makes no mistakes. Rust simply gives people a little more peace of mind knowing that unless they use unsafe they're probably fine in terms of memory issues.


As a side note, there was this once I was making an ecs engine in rust, and kept fighting the compiler on this issue. Specifically, the game engine bevy uses Query in the World to retrieve information about the game state, and I wanted to do the same. For instance, in the following function (or something similar, I honestly don't remember all that well):

fn getplayer(player: Query<Player>) {}

Would get player from the world and assign it to player (more or less). However rust was adamant in not letting me do this. After some thinking I finally realized why

fn getplayer(player: Query<Player>, player_too: Query<Player>) {}

Would give two mutable references to the same Player in the same function, which can be very easily mishandled, and thus is not allowed in rust.

I don't know about the MISRA standard, but I don't think that using it would have changed the way I coded my inherently flawed approach. This is a small example, one that didn't even matter that much in the grand scheme of things and could be even hard to understand why it's bad without knowing rust, but it is the one that came to mind. I think that if I had more experience I would he able to give you one that actually had security implications.

I'm no seasoned programmer, however

[-] laserm@lemmy.world 5 points 19 hours ago

I think I found your picture. Is it this one? 🤓

[-] CanadaPlus@lemmy.sdf.org 25 points 1 day ago* (last edited 1 day ago)

I'd guess it's Rust fan's genuine belief that they have something revolutionary.

“Rust’s compiler prevents common bugs” So does skill. No offense to you, but, this trope is getting so tiresome. If you like the language then go ahead and use it.

If you're that much of a galaxybrain, you should be writing everything directly in opcodes. In reality, nobody is, and we invented languages to help us perform an activity the human brain is very poorly suited to.

This attitude also means that OP stares at their own obvious bugs on a screen all day and then decides they're great, which is level of detachment from reality frightening to me.

[-] LeFantome@programming.dev 19 points 1 day ago* (last edited 1 day ago)

Sadly, it is a detachment from reality that is entirely normal, even typical. In all walks of life.

What I still find surprising, even though normal, is how technical people can push actual facts and evidence right out of their world view.

Sure, 70% of the bugs in C++ code bases are memory rated according to multiple sources. So let me aggressively and confidently berate this idiot that says the Rust compiler is doing something useful.

You do not have to use either language to see how idiotic this is. Even if you accept that this guy has “the skill” to make compiler help redundant, he has no point at all unless he thinks that “typical” C++ users have that same level of skill. And, provably and trivially researched—they do not. Being this wrong makes him, as self-evidenced, incompetent by definition.

All he proves in the end is that he is angry (and I guess not a fan of Rust).

“Angry and incompetent” is sadly a much more common trope than the ones he tires off.

[-] squaresinger@lemmy.world 7 points 23 hours ago

There's some weird effects with language-specific bug rates.

In old Java, most uncaught exceptions are NullpointerExceptions, because most other exceptions used to be checked. Can't not catch a checked exception.

So they made Kotlin, where NullpointerExceptions are the only type of checked exceptions. Now there are no unhandled NPEs anymore but now you get tons of other exceptions.

[-] CanadaPlus@lemmy.sdf.org 2 points 1 day ago

Oh yes, it's so very human nature. But damn.

Most coders get the message at least a bit, I think. Other engineers have a reputation for massive egotism, software engineers don't really.

[-] qaz@lemmy.world 1 points 19 hours ago

Other engineers have a reputation for massive egotism, software engineers don’t really.

That's a joke right?

[-] CanadaPlus@lemmy.sdf.org 1 points 12 hours ago* (last edited 12 hours ago)

Well, it's possible I'm missing something, or that there's a different reputation actually in the industry, since I'm an amateur. The first stereotypes I think of are unkempt, caffeine-dependent and socially inept.

When I've seen people asking for help online, traditional engineers seem much more likely to flex their credentials and then not actually answer. Although there's definitely software examples as well.

[-] masterspace@lemmy.ca 40 points 1 day ago* (last edited 1 day ago)

Skill issue takes are dumb as fuck. It's just republican personal responsibility takes using different language.

Intelligent people focus on producing systemically better outcomes.

[-] freetopos@feddit.nl 5 points 1 day ago

What's actually tiresome is how this keeps happening: https://paulgraham.com/avg.html

[-] qaz@lemmy.world 1 points 19 hours ago
[-] Scoopta@programming.dev 26 points 1 day ago* (last edited 1 day ago)

While I do totally see the advantages of rust and agree skill is not a solution given people make mistakes...I do agree a lot of the very vocal rust advocates do act almost religious and it is an annoying turn off.

[-] Valmond@lemmy.world 18 points 1 day ago

We had the Java guys in year 2000, at least Rust seems to be a decent language.

[-] LeFantome@programming.dev 6 points 1 day ago

Java was created so that teams of intermediate skill programmers could maintain large, long-lived code bases. And it did its job incredibly well.

If that is not your use case (or you do not want to admit that you are such a programmer), it may not be your favourite language.

I always like C# far better. It may be my favourite language overall. It has a bit more headroom and was designed somebody far more skilled. But it was designed to compete directly with Java. So, you know who it was built for.

[-] Valmond@lemmy.world 1 points 23 hours ago

Seems there still are some around!

load more comments (5 replies)
[-] daniskarma@lemmy.dbzer0.com 6 points 1 day ago

Do you have time to talk about our lord Rust? Did you know it died for our bugs so we don't have to debug them at run time?

[-] smiletolerantly@awful.systems 132 points 2 days ago
  • if your skill is so great that you would never cause the kinds of bugs the rust compiler is designed to prevent, then it will never keep you from compiling, and therefore your complaint is unnecessary and you can happily use rust
  • if you do encounter these error messages, then you are apparently not skilled enough to not use rust, and should use rust

In summary: use rust.

load more comments (19 replies)
[-] mokus 42 points 2 days ago

“Should I use rust or c++” is the wrong question IMO. The right question is “do I want the code I run, written by thousands or millions of randos, to be written in rust or c++”.

load more comments (1 replies)
[-] AllNewTypeFace@leminal.space 53 points 2 days ago

The human mind has limited capacity for things to pay attention to. If your attention is occupied with tiptoeing around the loaded guns scattered all over the floor, sooner or later you’ll slip and trip over one.

Of course, you’re a virtuoso programmer, so you can pirouette balletically around the floorguns as you deliver brilliantly efficient code. Which is great, until you have an off day, or you get bored of coding, run off to join the circus as a professional knife-juggler and your codebase is inherited by someone of more conventional aptitude.

Programming languages offering to keep track of some of the things programmers need to be aware of has been a boon for maintainability of code and, yes, security. Like type systems: there’s a reason we no longer write assembly language, squeezing multiple things into the bits of a register, unless we’re doing party tricks like demo coding or trying to push very limited systems to their limits.

[-] BatmanAoD@programming.dev 24 points 2 days ago

... until you have an off day, or you get bored of coding, run off to join the circus as a professional knife-juggler and your codebase is inherited by someone of more conventional aptitude.

Sometimes you even have to deal with having mere mortals on your team!

load more comments (2 replies)
[-] IrateAnteater@sh.itjust.works 68 points 2 days ago

At this point, I've seen far more people being almost violently anti-rust than I've seen people being weirdly enthusiastic about rust. If Rust people are Jehovah's Witnesses, then a lot of the anti-Rust people are ISIS.

[-] wer2@lemmy.zip 1 points 1 day ago

Try suggesting people try out a garbage collected language and see how the crabs come to feast. :P

load more comments (7 replies)
[-] ExLisper@lemmy.curiana.net 12 points 1 day ago

The really annoying part is all the people saying that you shouldn't like Rust because actually it's not magically bug free. Yeah, no shit. No one who touched Rust claims it lets you write bug free code. People like Rust because it's modern, fast, has great tooling, great documentation and really nice features like Traits and Algebraic data types. Memory and thread safety is just a bonus.

load more comments (8 replies)
[-] b_tr3e@feddit.org 37 points 2 days ago

The problem with these followers of rust is that they're heathens, disbelievers and worshippers of the devil. Just like all of you heretics. There is just one programming language for the true believer and it is FORTRAN. The pure and true FORTRAN, that is, which is punched into cards of virgin paper, not the heresy created by the blasphemy of 99.

[-] MonkderVierte@lemmy.zip 9 points 1 day ago* (last edited 1 day ago)

The language/compiler restricting some bad practices makes safer code with less skill. Btw, there's also Safe C++

[-] AnotherPenguin@programming.dev 13 points 2 days ago

Everyone makes mistakes, no matter the level of skill

[-] zea_64 32 points 2 days ago

C's compiler prevents common type bugs and handles things like register allocation for you? So does skill.

load more comments
view more: next ›
this post was submitted on 03 Aug 2025
337 points (100.0% liked)

Programmer Humor

25495 readers
1758 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS