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

**URL:** <https://forums.swift.org/t/se-0345-if-let-shorthand-for-shadowing-an-existing-optional-variable/55805>\
**Category:** Proposal Reviews\
**Created:** [March 8, 2022, 11:24pm UTC](https://forums.swift.org/t/se-0345-if-let-shorthand-for-shadowing-an-existing-optional-variable/55805 "2022-03-08T23:24:15Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![Douglas\_Gregor](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/douglas_gregor/32/1362_2.png) [@Douglas\_Gregor](https://forums.swift.org/u/Douglas_Gregor)\
**Post date:** [March 9, 2022, 6:10pm UTC](https://forums.swift.org/t/se-0345-if-let-shorthand-for-shadowing-an-existing-optional-variable/55805/21 "2022-03-09T18:10:10Z")

</div>

> [@Philippe\_Hausler](#):
>
> It is a good quality of life improvement and does merit a change; but if I were to compare importance of this to other things it does not rank as high (this is not meant as a slight against the idea or the author, I just think there are bigger fish to fry that if we are short on resources this might not be the most impactful change to address).

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.

> [@Avi](#):
>
> The `x` of `if let x` will now literally refer to two variables simultaneously. This seems nonsensical and confusing.

It was noted in an [earlier pitch thread](https://forums.swift.org/t/lets-fix-if-let-syntax/48188/70) 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

---

_[View the full topic](https://forums.swift.org/t/se-0345-if-let-shorthand-for-shadowing-an-existing-optional-variable/55805)._
