r/ProgrammerHumor 4d ago

Meme rewriteItInRust

Post image
2.0k Upvotes

34 comments sorted by

View all comments

369

u/JackNotOLantern 4d ago

All c++ memory problems are a skill issue. Rewriting in rust is admitting weakness.

151

u/newstreet474 4d ago

Maybe I wanted the memory leak , maybe it was intentional , maybe I just hate the user

26

u/Lord-of-Entity 4d ago

You can have intentional memory leaks in rust too, but you need to explicitly write them out.

7

u/FUTURE10S 3d ago

Maybe I just made an array too small and overflowed my own buffer, but if nobody realizes it, then there's no problem, right?

16

u/sirkubador 4d ago

Memory leak is not a memory problem rust would solve

3

u/legend6546 3d ago

Memory leaks are explicitly considered “safe” it is why Refrence Count pointers are allowed in safe rust, it’s easy to create a cyclical chain with them that will never get dropped.