[swift-evolution] Allow let binding of non-optionals

Russ Bishop xenadu at gmail.com
Thu Jan 7 00:40:52 CST 2016

I often want to bind variables to a specific scope, or perhaps I have three optionals I want to bind and one non-optional. (Often I need that non-optional value as part of a where condition check but not being able to bind it means I leak the variable to the outer scope).

Not being able to bind non-optionals breaks the flow of the code and forces me to make a minor context switch when it really doesn’t matter, nor does it aid code clarity.  

Does anyone have strong thoughts about this? I tried searching the evolution repo and the mailing list and didn’t see anything.


More information about the swift-evolution mailing list