[swift-evolution] ternary operator ?: suggestion
J. Cheyo Jimenez
cheyo at masters3d.com
Thu Dec 17 00:01:44 CST 2015
Thank you Chris for all the feedback.
Should there be a spot on the website or github with frequent
proposed changes that are not feasible or that not better solution has been
found (such as the ?: operator )?
I am thinking this would cut down on people asking to turn operators into
keywords (or similar ) but still encourage better solutions to be proposed.
On Wednesday, December 16, 2015, Chris Lattner via swift-evolution <
swift-evolution at swift.org> wrote:
> > On Dec 16, 2015, at 7:36 PM, Charles Constant <charles at charlesism.com
> > 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
> > let i = boo ? ( true: 123, false: 456 )
> I would characterize this as “different” than ?:, but not better. Given
> that it isn’t “better”, I’d argue that following C (and tons of other
> languages) would make sense here.
> swift-evolution mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution