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
Here’s a case where this could be better than just deleting lines with only side effects: you set the value to true, and true is the default, so removing the line does nothing, but negating the line does.
It is also useful for initializers and method parameters:
letx=foo(bar:true) // before
letx=foo(bar:false) // after
The text was updated successfully, but these errors were encountered:
Code like this:
Here’s a case where this could be better than just deleting lines with only side effects: you set the value to
true
, andtrue
is the default, so removing the line does nothing, but negating the line does.It is also useful for initializers and method parameters:
The text was updated successfully, but these errors were encountered: