3 ms·
It would allow functions to be treated generically as returning error-able types. Since some functions even return 3 arguments where the third is the error, thi
by lucian1900 5y ago
It would allow functions to be treated generically as returning error-able types. Since some functions even return 3 arguments where the third is the error, this isn't possible today.
It would also allow defer-like syntax to be used on the value a function returns, to return early from the calling function. Rust's ? is an excellent example of this, allowing explicit delegation of error handling that is still very lightweight syntactically.