4 ms·
the purpose of try get was also to avoid boxing of value types
by cobalt 10y ago
the 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!