How often have you written something like the following?

`
if indexPath.row == 0 { return }

guard let thing = things[index] else { return nil }
`

I propose adding some syntactic sugar to make such statements more readable and 
simple to write:

`
return if indexPath.row == 0

return nil unless let thing = things[index]
`

I don’t know how easy or hard this would be to implement, but I think it would 
improve some code significantly.

–Julian Dunskus
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to