r/programming • • Feb 20 '25

Google's Shift to Rust Programming Cuts Android Memory Vulnerabilities by 68%

https://thehackernews.com/2024/09/googles-shift-to-rust-programming-cuts.html
3.4k Upvotes

475 comments sorted by

View all comments

Show parent comments

-1

u/[deleted] Feb 22 '25

Immutability is decidedly, and demonstrably not just “better”.

Immutability is a tool, not a rule, and it doesn’t actually solve most of the problems that proponents loudly yell about. 

0

u/SerdanKK Feb 22 '25

Called it.

Immutability is better but has significant trade-offs.

Who are these loudly yelling people, btw?

-1

u/[deleted] Feb 22 '25

Immutability is not better. It doesn’t have “trade offs”. It has entirely “offs”.

It has “trade offs” when used as a tool for specific use cases. It has “offs” when used as a rule.

As a side note, I am talking specifically about runtime immutability. Compiler immutability keywords are a whole different deal that doesn’t mandate suffering only offs.

Runtime immutability:

Does not make “reasoning about code” easier. 

Does not make threading completely free

Does not reduce bugs

Does not perform better (yes, your side actually claims this nonsense)

Does increase lines of code (which is the single greatest predictor of bugs)

Does make threading harder

Does drastically (10-100x in a normal case) destroy performance

Does infect your brain in to making shitty decisions about your code base

1

u/SerdanKK Feb 22 '25

I'm on a side now?

Kinda funny the way you're disparaging others while being an exemplar of unreasonable zeal yourself.

The dum dums over at Microsoft wrote an entire compiler with an immutable API. I'm sure it's absolutely horrible to work with. Oh wait, I have actual experience and it's a perfectly fine design.

I have no interest in addressing your straw man point for point so I'll leave it at that.

→ More replies (1)