[Proposal]Conditional statement in with-expression #4308
Unanswered
rabbitism
asked this question in
Language Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In order to decrease cloning cost when creating new record instance from existing one but whether property will be changed is based on different conditions, it'll be nice to support conditional statement in with-expression.
By doing this, it solved the problem of whether to assign a new value instead of which new value to assign
This can be lowered to
Current walk around:
Beta Was this translation helpful? Give feedback.
All reactions