this post was submitted on 13 Mar 2025
619 points (95.3% liked)
linuxmemes
23532 readers
220 users here now
Hint: :q!
Sister communities:
Community rules (click to expand)
1. Follow the site-wide rules
- Instance-wide TOS: https://legal.lemmy.world/tos/
- Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
3. Post Linux-related content
sudo
in Windows.4. No recent reposts
5. π¬π§ Language/ΡΠ·ΡΠΊ/Sprache
6. (NEW!) Regarding public figures
We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.Please report posts and comments that break these rules!
Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I think it boils down, how we define "memory safe". C++ is perfectly memory safe, if you know what you're doing. A lot of people don't. Which is why Rust was born. that doesn't make C++ a memory-unsafe language. It just demands more responsibility from the user. A design philosophy that comes with a lot more flexibility than Rust can offer.
Which is fine. Both languages have their perks. But saying C++ isn't memory safe, while Rust is, is in my opinion just plainly wrong. Besides, with "unsafe" Rust inherently already the door for memory issues.
Modern C++ practises and dev patterns can handle most memory issues in C++ pretty easily. Consider smart pointers for example, or RAII.
It's not the language's fault if it is used wrong.
https://en.m.wikipedia.org/wiki/Memory_safety
https://www.memorysafety.org/docs/memory-safety/
https://media.defense.gov/2022/Nov/10/2003112742/-1/-1/0/CSI_SOFTWARE_MEMORY_SAFETY.PDF
https://www.cisa.gov/news-events/news/urgent-need-memory-safety-software-products
why do you want to redefine what the term means? why does it hurt to admit that C++ is not memory safe? It's not about your weakness.
Which language would you say is not memory safe then? Is there any serious language out there where you should expect memory issues if you don't make any mistakes?
If the standard is "you know what you're doing and never make mistakes", then all languages are memory safe. All you're doing is arguing against memory safety as a concept by redefining the term in such a way that it becomes meaningless.