[swift-evolution] Remove Failable Initializers

Dave Abrahams dabrahams at apple.com
Mon Mar 7 14:35:10 CST 2016


on Sat Mar 05 2016, Brent Royal-Gordon <swift-evolution at swift.org> wrote:

> Ultimately, the reason throwing isn't as efficient as optionals is
> simply that throwing communicates more data. And it communicates more
> data precisely *because* it is more expressive, because it supports
> many error cases instead of just one. Ultimately you're running up
> against information theory here, and the optimizer can't change
> fundamental laws of mathematics.

It's not just that it communicates more data, but also that it does so
with type erasure.

-- 
-Dave



More information about the swift-evolution mailing list