[swift-evolution] Proposal: Initialization should not be required in precondition(false) case.

Amir Michail a.michail at me.com
Thu Feb 18 16:21:42 CST 2016


> On Feb 18, 2016, at 4:52 PM, Thorsten Seitz <tseitz42 at icloud.com> wrote:
> 
> 
>> Am 12.02.2016 um 18:26 schrieb Amir Michail via swift-evolution <swift-evolution at swift.org>:
>> 
>>> How far would you require the compiler to go?  precondition(2 < 1)?
>>> precondition(someFunctionThatAlwaysReturnsFalse())?
>>> precondition(isFermatsLastTheoremTrue())?
>> 
>> Just “false”. Why would you write anything else?
> 
> Why would you write anything else than preconditionFailure()??

Everyone knows about “false” but not everyone knows about preconditionFailure().

> 
> -Thorsten



More information about the swift-evolution mailing list