[swift-evolution] ternary operator ?: suggestion
andrey at tarantsov.com
Mon Dec 14 12:48:48 CST 2015
> Can you add to the proposal why a function cannot be added for tertiary expressions (under “Alternates Considered”):
That's one fresh idea, and I like it. I can't find anything wrong with it, except that fn doesn't need to be an @autoclosure, just a Bool.
I believe the customary name for that function is iff.
I always wrap ?: in parenthesis for readability anyway.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution