Re:A brief introduction to C++'s model for type- and resourc...
by Manishearth on Friday January 15, 2016 @02:32PM
(#10911521)
You can solve this problem the Rust way too: don't use a constructor. Create a static `new` method that returns the object to you, with optional error flags.
This is still RAII, you're just not using a constructor to acquire. Rust doesn't have constructors and is still RAII.
This is still RAII, you're just not using a constructor to acquire. Rust doesn't have constructors and is still RAII.