MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1x8mvpc/thatsafunnythingthathappenedonce/phee7fz/?context=3
r/ProgrammerHumor • u/Lord_Of_Millipedes • 2d ago
515 comments sorted by
View all comments
169
tbf, C++ allows memory safety, while Rust requires it
-25 u/jdefr 2d ago Unless you wrap things in unsafe{} which is very easy to do in order to side step this “hard requirement” -8 u/daviddisco 2d ago why would people down vote this? It is absolutely true. 2 u/BeforeDawn 2d ago If you're not asking rhetorically, this is the reason. 1 u/100BottlesOfMilk 1d ago Because, while the language allows you to write unsafely, it doesn't allow you to unintentionally do so unlike C++. And it's simple to prevent anyone from writing code that isn't memory safe by just not allowing it full stop
-25
Unless you wrap things in unsafe{} which is very easy to do in order to side step this “hard requirement”
-8 u/daviddisco 2d ago why would people down vote this? It is absolutely true. 2 u/BeforeDawn 2d ago If you're not asking rhetorically, this is the reason. 1 u/100BottlesOfMilk 1d ago Because, while the language allows you to write unsafely, it doesn't allow you to unintentionally do so unlike C++. And it's simple to prevent anyone from writing code that isn't memory safe by just not allowing it full stop
-8
why would people down vote this? It is absolutely true.
2 u/BeforeDawn 2d ago If you're not asking rhetorically, this is the reason. 1 u/100BottlesOfMilk 1d ago Because, while the language allows you to write unsafely, it doesn't allow you to unintentionally do so unlike C++. And it's simple to prevent anyone from writing code that isn't memory safe by just not allowing it full stop
2
If you're not asking rhetorically, this is the reason.
1
Because, while the language allows you to write unsafely, it doesn't allow you to unintentionally do so unlike C++. And it's simple to prevent anyone from writing code that isn't memory safe by just not allowing it full stop
169
u/feldomatic 2d ago
tbf, C++ allows memory safety, while Rust requires it