On Wed, Jun 28, 2017 at 10:18 PM, Alan Westbrook <[email protected]>
wrote:

>
> On Jun 28, 2017, at 8:02 PM, Xiaodi Wu <[email protected]> wrote:
>
> I reject both these notions. Having seen the examples given above, I'm now
> leaning towards the conclusion that there is nothing in the way of
> explanation in a string that can usefully elaborate upon the very
> unambiguous statement that is a force unwrap.
>
>
> That the functionality exists to provide messages with fatal errors is an
> indication that they do have some utility.
>

Not at all. A message is required for `fatalError` simply to explain _what_
the error is. By contrast, it has already been conceded that there is
absolutely no confusion as to _what_ the error is in the case of a failed
force-unwrap. Rather, as Ben Cohen argued above, the idea behind this
proposal is that it is useful to explain the "why"--on the premise that
there is some "why" which is not deducible from the "what." My argument is
that there is no suitable "why" which can be suitably expressed in a
sugared form of a fatalError string argument.
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to