4 ms·
> Why would stabilizing the Result version of '?' lock out the possibility of supporting it on Option or other types in the future? It wouldn't necessarily but
by tatterdemalion 10y ago
> Why would stabilizing the Result version of '?' lock out the possibility of supporting it on Option or other types in the future?
It wouldn't necessarily but it could be done in a way where it does lock it out. For example, `?` could be implemented by defining an attribute which is applied to Result in libcore. If that attribute were stabilized, it would make it hard to migrate to using a trait to define the behavior of `?`, because you've made a guarantee that this attribute makes a type use `?`.
All of this has been avoided though, I think. Stabilization or deprecation of `?` is pretty much a political issue now and not a technical one (and I don't mean that the question is frivolous, just that its about what people want now).
There's still the Carrier trait which has unresolved technical questions, and the catch construct I don't think even has a PR.