Suggestion - rename value() with perhaps or_throw()
eyalz800 opened this issue · 1 comments
eyalz800 commented
It’s a bit surprising to see file.close().value() because why expect a value here? The intent is to throw an exception if we fail and I find it much more expressive to write file.close().or_throw(), which means we either succeed and return result or we throw by which case there is no result.
What do you think?
ned14 commented
The .value()
stuff comes from the result<T>
which LLFIO functions return. Nothing to do with LLFIO.
Unfortunately WG21 have decided that result<T>::value()
is an acceptable naming choice, so I'll have to close this. Sorry.