3 ms·
A linear resource would require that the resource is explicitly released on all codepaths no?
by masklinn 8y ago
A linear resource would require that the resource is explicitly released on all codepaths no?
- pcwalton 8y agoNot in Rust, and not in any language where you can put resources in objects with shared ownership (i.e. any remotely popular general purpose language). Throwing exceptions isn't a particularly good solution either, for the same reason. Exceptions are hard to reliably handle when you can't easily reason about where they will be thrown from.