[swift-evolution] [Pitch] Replace the ternary operator with an in-language function

Charlotte Tortorella charlotte.tortorella at icloud.com
Wed Oct 26 00:56:50 CDT 2016


Hi Chris,

I see, well with that in mind the proposal does set out how ?: is harmful to comprehension of code for new programmers and I hope the pros and cons of keeping it are thoroughly vetted. 

Regards,
Charlotte

> On 26 Oct. 2016, at 16:52, Chris Lattner <clattner at apple.com> wrote:
> 
> 
>>> On Oct 25, 2016, at 10:30 PM, Charlotte Angela Tortorella via swift-evolution <swift-evolution at swift.org> wrote:
>>> 
>>>  Not a replacement for the Swift 4 source stability goal.
>> 
>> Swift 4 doesn't actually have a source stability goal. It has an ABI stability goal. These are two very different things. ABI is the calling conventions of the language.
> 
> Hi Charlotte,
> 
> Swift 4 has a strong source level compatibility goal.  This is explained in the main swift-evolution page and also in the proposal template:
> https://github.com/apple/swift-evolution/blob/master/0000-template.md
> 
> "Relative to the Swift 3 evolution process, the source compatibility requirements for Swift 4 are much more stringent: we should only break source compatibility if the Swift 3 constructs were actively harmful in some way, the volume of affected Swift 3 code is relatively small, and we can provide source compatibility (in Swift 3 compatibility mode) and migration.”
> 
> I agree with you that a migrator could handle this change, but such a significant source breaking change still needs major justification for doing so.  Further in the Swift 3 timeframe, this very topic was hotly debated by the folks who wanted to turn the if statement into an expression (eliminating the need for the ?: operator).
> 
> -Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161026/de026b8f/attachment.html>


More information about the swift-evolution mailing list