3 ms·
How would the equivalent linked list in c++ be unsafe? The problem with c++ was never writing simple data structures, but was writing complete programs without
by goalieca 4y ago
How would the equivalent linked list in c++ be unsafe?
The problem with c++ was never writing simple data structures, but was writing complete programs without a single mistake in the informal contracts between functions. Static analysis tools and other crutches help but having a stricter ruleset to enforce is what makes rust a winner.
- RcouF1uZ4gsC 4y agoThe list itself would not be unsafe, but the usages of it could be. For example, iterator invalidation, access from another thread, etc that Rust would prevent you from doing even if you used unsafe to implement the linked list.