2 ms·
I've been really happy with C++ lambda's lately. Would be nice to see Rust's Option<T> and Result<T,E> ported over to C++ since I find that error handling extr
by vvanders 11y ago
I've been really happy with C++ lambda's lately.
Would be nice to see Rust's Option<T> and Result<T,E> ported over to C++ since I find that error handling extremely elegant compared to most C++ approaches.
- loop2 11y agoOption has been around for a while as boost::optional or now std::experimental::optional. Result is coming and has a reference implementation as boost::expected. There's also a type-erased option type, "any". They're quite nice, especially with a few trivial additions for ergonomics.
- vvanders 11y agoYup, except you lost me as soon as you said "boost". I enjoy my fast compile speeds very much. :)
- lholden 11y agoAlready done (kinda). There is no match exhaustion, but C++ is getting an option type. (Part of the library fundamentals TS). http://en.cppreference.com/w/cpp/experimental/optional http://en.cppreference.com/w/cpp/experimental/optional