Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
panstromek
5 months ago
|
parent
|
context
|
favorite
| on:
How does Ada's memory safety compare against Rust?
Rust has stricter rules than C++. E.g. global mutable variables are way more dangerous in Rust than in C++ - just creating a reference to it can be immediate undefined behaviour.
oneshtein
5 months ago
[–]
In Rust, use UnsafeCell.
In C++, multiple references to the same variable may cause «use after free» bug in it destructor.
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: