2 ms·
> Every construction has exactly one use (destruction.) it's fairly easy to see that RAII is a very limited version of a linear type system. Aside from actuall
by masklinn 9y ago
> Every construction has exactly one use (destruction.) it's fairly easy to see that RAII is a very limited version of a linear type system.
Aside from actually having it integrated to the type system, Rust does exactly that. RAII is not linear.
> But C++ instantiations for RAII are not destructed more than once.
That's also what happens in Rust, it's not a linear type system.