Reuse variable as a return value *foo
prefix while declaring another one.
#1678
Kelimion
started this conversation in
Ideas/Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
Sometimes you end up calling an API (several times), but can't use
or_return
because it's incompatiblewith the procedure return type, for example when wrapping platform-specific code.
Describe the solution you'd like
It would be nice in cases like these to reuse a variable (from the same scope).
Allowed:
Disallowed:
Allowed:
In all these cases we can't rely on
or_return
to strip off the second return value, so we end upwith a proliferation of
<name>_ok
or<name>_err
variables.Beta Was this translation helpful? Give feedback.
All reactions