Re:The Next Step for Generics
by AaronFriel on Tuesday June 16, 2020 @05:16PM
(#23544259)
Who are you replying to? Is any of your elaboration related to this result type?
class Result<T>
{
bool IsSuccess {get; set;}
string Message {get; set;}
T Data {get; set;}
}
Re:The Next Step for Generics
by joshuamorton on Tuesday June 16, 2020 @05:20PM
(#23544307)
Ah you're quite correct.
See for example https://doc.rust-lang.org/std/result/enum.Result.html#method... in rust, https://docs.oracle.com/javase/8/docs/api/java/util/Optional... in Java, and https://en.cppreference.com/w/cpp/utility/optional/value_or in C++.