> On Jun 27, 2017, at 1:51 PM, Dave DeLong via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> 
>> On Jun 27, 2017, at 1:43 PM, Tony Allevato via swift-evolution 
>> <swift-evolution@swift.org <mailto:swift-evolution@swift.org>> wrote:
>> 
>> I agree with Jaden and Xiaodi above—making Never a proper bottom type and 
>> using ?? would accomplish the same thing, and it's more general because it 
>> doesn't imply fatalError.
>> 
>> IMO, I don't think we should be making it *easier* to hide traps in our 
>> code. I don't think having to write a full guard/fatalError is all that bad 
>> a thing—on the contrary, I want major failure points to stick out when I 
>> read code. That being said, if some users want something like this, Never + 
>> ?? would get us there with something already planned for the language, 
>> rather than introducing a new operator (for which the bar should be set 
>> high).
> 
> I disagree that this is making hiding traps easier. It’s asking you to put in 
> two exclamation points instead of only one to force unwrap, along with an 
> explanation of why you think it’s ok to be doing so. That’s much more “in 
> your face” than “array.last!”.
> 
> Dave

This ties in pretty closely with my goals for the "roles" proposal. I want 
Swift to evolve towards clarifying developer intent both for code inspection 
and compilation support.

I honestly wouldn't mind having both solutions available.

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

Reply via email to