[swift-evolution] [Idea] if let value!

Vladimir.S svabox at gmail.com
Tue May 17 11:06:21 CDT 2016


On 17.05.2016 18:48, Matthew Johnson via swift-evolution wrote:
>  Being syntactic sugar for something that is already not too bad

Well.. Personally I feel like construction `if let someMyValue = 
someMyValue` is bad exactly because of this the same repeated name. 
Anywhere I see repeated code, I feel like this is not good.

> means it
> would need to be as concise as possible.  If you want to advocate something
> like this, maybe consider just `if unwrap`:
>
> if unwrap someValue {
> }
>

Yes, IMO the best idea for this feature for this moment. Clear and 
explicit. Why not?


More information about the swift-evolution mailing list