3 ms·
Aside from what Steve mentioned: - Simpler lifetime system: Both a pro and a con, because some functions will not be expressible using "c++ borrowing" - No `A
by Manishearth 11y ago
Aside from what Steve mentioned:
- Simpler lifetime system: Both a pro and a con, because some functions will not be expressible using "c++ borrowing"
- No `Alias XOR mutability`, which in rust protects from memory issues and things like iterator invalidation. Not sure if isocpp addresses the segfault that can be caused by
vector<int> v;
// fill it up with elements
int *ptr = v[3];
v.push_back(0); // may reallocate
cout<<*ptr; // may segfault
its been a while since I looked at the guidelines and I'm not sure of either of these points, take them with a grain of salt.
- pcwalton 11y agoIt does rely on alias xor mutability.
- Manishearth 11y agoHuh. I should read it again.