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
contextual conversion to bool is specified in the controlling expression of if, while, for and a few other cases.
It's style thing - my preference remains for the short form when possible.
This thread just shows it is subtle, as is usual in the postmodern era.
I might comment in a code review but wouldn't request a change.
I generally avoid optional anyhow, except say in database code for 'true' optionals,
exactly because of issues like this
Even nicer, old style, without the extraneous ofoo conditional?
Old style if could always be a single declaration,
new style needed for more complex cases.
We could argue the ifs and buts.
The text was updated successfully, but these errors were encountered: