> On Jan 5, 2016, at 16:06, Thorsten Seitz via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> 
>> Am 05.01.2016 um 18:12 schrieb Matthew Johnson <matt...@anandabits.com 
>> <mailto:matt...@anandabits.com>>:
>> 
>>>>>> On Jan 5, 2016, at 12:29 AM, Thorsten Seitz via swift-evolution 
>>>>>> <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> wrote:
>>>>>> 
>>>>>> I once suggested the following ternary like switch:
>>>>>> 
>>>>>> let x = color ?
>>>>>>      case .Red: 0xFF0000
>>>>>>      case .Green: 0x00FF00
>>>>>>      case .Blue: 0x0000FF 
>>>>>>      default: 0xFFFFFF
>>>>> 
>>>>> 
>> 
>> Is anybody going to write up a proposal for the ternary-like switch 
>> expression?
>> 
> 
> I’ll give it a try.

Any reason to not use switch let x = color … ? We already have if let, guard 
let, so I think switch let is pretty “swift-ly”.

:: marcelo.alves
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to