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
If we don't want #5835, there are 2 simpler things we can do to help make sum type handling and optional handling more similar:
if val := opt { was only documented last week in doc: Document optional if val := opt { #5838. We could change the syntax to use as for consistency with if sum is T as var and match sum as var:
This discussion was converted from issue #5890 on September 22, 2021 00:47.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If we don't want #5835, there are 2 simpler things we can do to help make sum type handling and optional handling more similar:
if val := opt {
was only documented last week in doc: Document optionalif val := opt {
#5838. We could change the syntax to useas
for consistency withif sum is T as var
andmatch sum as var
:or
for sum type instances:Beta Was this translation helpful? Give feedback.
All reactions