[swift-evolution] Optional Setting

Brent Royal-Gordon brent at architechies.com
Tue Dec 15 17:10:22 CST 2015


> I think that the existing syntax for “??” handles this need fairly well without requiring an additional assignment operator:
> 
> 	a = a ?? []

When the variable is `a`, sure. When it’s `scoreboardViewController.selectedScoreboard`, not so much.

+1 from me, though I prefer the `??=` spelling to match the `??` operator more closely.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list