[swift-evolution] ternary operator ?: suggestion

Tino Heth 2th at gmx.de
Tue Dec 22 03:07:34 CST 2015

Hi there,

I don't think the operator has a future in Swift:
Considering that the C-style for-loop and ++/— are doomed, "?:" would look like a living fossil in the language.
"??" can handle one use case really well, and if/switch aren't that bad in the other cases.
I'm quite sure those arguments already came up in the thread, so here is my conclusion:
I don't vote for ?: to be removed, but I wouldn't like to see a replacement that has more complexity.

Best regards,

More information about the swift-evolution mailing list