You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expression statements currently discard the return value. For functions that return Results, this can result in errors (exceptions) being unintentionally dropped. The likelihood of this is increased due to automatic Result conversions, since a function that throws exceptions like parse! could accidentally be called as parse.
Languages like Rust, for instance, have more advanced solutions to this for determining whether the return value of any function can be ignored. This is a more complex overhaul, so for now special-casing this to Result seems to be a fair balance.
The text was updated successfully, but these errors were encountered:
Expression statements currently discard the return value. For functions that return Results, this can result in errors (exceptions) being unintentionally dropped. The likelihood of this is increased due to automatic Result conversions, since a function that throws exceptions like
parse!
could accidentally be called asparse
.Languages like Rust, for instance, have more advanced solutions to this for determining whether the return value of any function can be ignored. This is a more complex overhaul, so for now special-casing this to Result seems to be a fair balance.
The text was updated successfully, but these errors were encountered: