[swift-evolution] ternary operator ?: suggestion

Charles Constant charles at charlesism.com
Wed Dec 16 21:36:11 CST 2015


One more thought. This syntax would also placate ternary haters. I think
the traditional complaint about ternary expressions is that people can't
remember the order of the true and false values. This would not be an issue
with:

 let i = boo ? ( true: 123, false: 456 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151216/4c61b5aa/attachment.html>


More information about the swift-evolution mailing list