3 ms·
This would be a great place for Maybe<Result>
by krallja 10y ago
This would be a great place for Maybe<Result>
- cobalt 10y agothe purpose of try get was also to avoid boxing of value types
- krallja 10y agoI didn't know that. Couldn't the generic parameter of Some<T> be a nonboxed value type, though? Some<T> could even be a struct, to avoid object allocation. Edit: although that would get boxed so it could fit in a Maybe<T>, so yeah, I see what you're saying!