
"Boris Schaeling" <boris@highscore.de> writes:
On Sun, 19 Aug 2012 23:06:07 +0200, Oliver Kowalke <oliver.kowalke@gmx.de> wrote:
[...]process is value-base. What happened if I copy a child class and invalidate one of the copies.
The same what happens if you do that with file descriptors and Windows HANDLEs. And what also happens if you do that with boost::iostreams::file_descriptor_sink or boost::iostreams::file_descriptor_source if use boost::iostreams::close_handle. Not that I'm against RAII - but I wonder whether we are trying a bit too hard to solve a problem which (seems to me at least) has never been a problem for anyone in practice.
Of course it's a problem. That's why we're trying to do it in C++, right? Otherwise you might as well just write it in C where people expect to do their own cleanup.
I would be fine if we could implement the RAII type in a platform-independent way but ...
We haven't found one ... yet but we certainly must before adding this library to Boost. Once it's in Boost it becomes 'cannon' and therefore much trickier to make the required changes. Before then we can screw around with the API as much as we like without worrying about breaking existing clients. Alex