[swift-evolution] [Pitch] Replace the ternary operator with an in-language function
William Sumner
prestonsumner at me.com
Wed Oct 26 11:43:08 CDT 2016
> On Oct 26, 2016, at 9:12 AM, Mark Sands via swift-evolution <swift-evolution at swift.org> wrote:
>
> Strong +1 from me.
>
> This simply feels like the right approach for Swift, as we see the language head in a direction that has abandoned traditional C-style idioms. As swift has already dropped support for the ++/-- operators and C-style for loops it makes logical sense that dropping the ternary operator (or replacing with a more Swift-like idiom) should follow.
>
> As a side note, after upgrading my swift code to Swift 3, I feel as though I've become un-phased at future source breaking changes until full stability is met and set in stone. If they're worth it, bring them on, I say.
Training users to expect source-breaking churn would be highly damaging to the language. The removal of C-style for loops and increment/decrement operators came with sufficient justification beyond their being inherited from C. I don’t think there’s a sufficient justification for this change, especially with the bar set high for such changes.
Preston
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161026/681b48a1/attachment.html>
More information about the swift-evolution
mailing list