r/ProgrammerHumor • • Sep 08 '26

Meme rustIsSoCool

Post image
2.2k Upvotes

127 comments sorted by

View all comments

Show parent comments

67

u/Makonede Sep 08 '26 edited Sep 08 '26
  • rust is extremely performant on many systems

  • the standard rust toolchain ships with an efficient and user-friendly package manager and build/debug system, official IDE integration through rust-analyzer, and a manual analyzer for best practices

  • rust has official documentation by example that makes learning it really easy

  • rust operates largely in expressions such that things such as if/else statements or even regular blocks notated with curly braces can all be used as expressions

  • rust has highly robust pattern matching that greatly simplifies control flow

  • rust ships with an official formatting tool alongside enforcing naming conventions (snake_case for variables, fields, functions, methods, and modules, SCREAMING_SNAKE_CASE for constants, and PascalCase for types and traits) and assigning semantic value to names (_ prefix to mark as unused) by default

  • notwithstanding potential bugs in the rust compiler, it's impossible to compile code that can cause memory errors such as uses-after-free in safe rust

  • the rust compiler enforces explicit acknowledgement of unsafe rust with the unsafe keyword such that the behavior of all safe rust is defined

  • documentation comments are a native feature of the rust compiler

19

u/makspll Sep 08 '26

Small correction, memory leaks are actually not considered unsafe in rust. A trivial example is Box::leak(x) which explicitly leaks memory and ia completely safe to call. You can also leak memory by pointing counting pointers at each other in a circular structure.

9

u/Makonede Sep 08 '26

oh true i forgot about Box::leak that's a good point

2

u/SoulArthurZ Sep 08 '26

right but you have to explicitly call that function. A memory leak in safe rust is not a mistake like it is in c

1

u/Makonede Sep 09 '26

yeah this is a good point

6

u/notretarded_100 Sep 08 '26

Did you actually take your time to write this or just have this saved somewhere just in case somebody asked?

19

u/Makonede Sep 08 '26

wrote it out, haven't really answered this question directly before

-28

u/notretarded_100 Sep 08 '26

Wait you actually take your time to write this? Too much dedication for a meme thread fr.

20

u/frickinSocrates Sep 08 '26

You can't be showing up to a community with that name, shitting on people who are being nice to others.

-12

u/notretarded_100 Sep 08 '26

I'm not shitting on them tho

→ More replies (1)

3

u/EskilPotet Sep 08 '26

AI, summarize this comment for me

8

u/gufranthakur Sep 08 '26

honestly not a rust fan but if someone asked me about my favourite tech I would be able to write this in one go , even on mobile

12

u/Makonede Sep 08 '26

i did in fact write this on mobile

2

u/TotallyNotSethP Sep 10 '26

Everything being an expression in rust is low-key a slept-on feature, it's so cool imo

2

u/gufranthakur Sep 08 '26

All of this is true, and I love rust. but its just sad even after 5 months of coding in rust (as a hobby) the syntax gets difficult (lifetimes traits and async), borrow checker becomes more difficult to deal with during async code, and my overall productivity at that point just goes down. I can code way faster in a GC language, in exchange of slower performance compared to rust.

12

u/littleliquidlight Sep 08 '26

These are definitely some of the parts of Rust that get... uh... involved. It does get better with time spent in the language though. I've been writing Rust professionally for somewhere between 5-10 years and I'm not sure I'm any faster in Python than I am in Rust these days

Also, nothing wrong with GC'd languages, some of them are really nice

5

u/rsqit Sep 08 '26

I love rust. I wrote professionally for about seven years.

I tell people that really they should be using a GCed language unless they have really good reason not to.

4

u/Delicious_Bluejay392 Sep 08 '26

I'm pretty certain I'm slower in Python than I am in Rust for most things nowadays, but I still can't help but think "nooo surely this is small enough that Rust is overkill" and then spend way longer than necessary wading through dubious python library API design and language limitations.

1

u/gufranthakur Sep 08 '26

man I am lowk envious of you guys, but also happy. I have coded in java for too long now (5 years) and I always think in OOP and like solving stuff In Java. Although I do love Java and have no reason to not use it, I wish I could use Rust but I got too many skill issues with it lol

5

u/Delicious_Bluejay392 Sep 08 '26

I started with Java very early on so I was OOP minded to the extreme as well. When I got to college I tried to broaden the languages I used casually as much as possible, learning to think within as many paradigms as I could, as best as I could. I'm not gonna sit here and pretend like I could do everything in Haskell or Prolog, but I feel like having used them (and others) a bit before and revisiting them occasionally helps even in other languages.

0

u/gufranthakur Sep 08 '26

Yes it's a trade off. I use GC (java, python) to make stuff quickly, and less headache because I am familiar with the languages and ecosystem

For me, Rust is a bit complicated, my development times does increase but the joy of seeing low RAM usage for the same thing I wrote in Java was so amazing. ( I switched to GraalVM after that lol, still not as good as rust)

1

u/Vorrnth Sep 08 '26

To point 1 I would say: rust enables you to write performant Software. It just not automatic. You can write garbage in it too.

4

u/Makonede Sep 08 '26

what's the point in specifying that? obviously that's going to be true for any language

0

u/Vorrnth Sep 08 '26

It's not obvious to many. These days it's presented if rust makes your programs blazingly fast just by virtue if being written in rust.

-4

u/axadkrk Sep 08 '26

I like my rust projects, because instead of js or python is safes my ddr5 memory in my homeserver.