SE-0345: `if let` shorthand for shadowing an existing optional variable

I just want to step in here as review manager / Core Team member here to say that this form of feedback isn't going to factor into the Core Team's decision.

It was noted in an earlier pitch thread that there is precedent for a single utterance of a variable name to represent two different entities: capture lists like { [x] in ... } are both a declaration (of a captured variable) and a reference to the variable whose value is being captured. And with { [weak self] in ... }, we also see those two variables having different types. @cal, I recommend that you amend the proposal text to mention capture lists as precedent for the proposed let x referring to two different things named x.

Doug

22 Likes