3 ms·
Yes, but that’s a heavyweight solution that you don’t always need. Notice that in my example problem an arena that only ever grows can use ordinary references.
by db48x 1y ago
Yes, but that’s a heavyweight solution that you don’t always need. Notice that in my example problem an arena that only ever grows can use ordinary references. You don’t need any kind of handle type in that case.
And if you are manipulating real graphs that can grow and shrink and you reach for handles as a solution then you’ve introduced that kind of problem in a controlled setting. Rust also gives you the tools to minimize the risks. In practice this rarely comes up, unlike in C where use-after-free bugs are endemic.
- cwillu 1y agoYou appear to be arguing about something I didn't say; feel free to continue, but I'm going elsewhere now, cheers.