# \[Pre-Pre-RFC\] Reviving Refutable Let \[Runoff\]

**URL:** <https://internals.rust-lang.org/t/pre-pre-rfc-reviving-refutable-let-runoff/6672>\
**Category:** language design\
**Created:** [January 31, 2018, 4:41am UTC](https://internals.rust-lang.org/t/pre-pre-rfc-reviving-refutable-let-runoff/6672 "2018-01-31T04:41:00Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![kennytm](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/kennytm/32/161_2.png) [@kennytm](https://internals.rust-lang.org/u/kennytm)\
**Post date:** [February 1, 2018, 11:59am UTC](https://internals.rust-lang.org/t/pre-pre-rfc-reviving-refutable-let-runoff/6672/9 "2018-02-01T11:59:15Z")

</div>

Details about `$expr is $pat` (or `let $pat = $expr` as a boolean expression) can be found in discussions of [RFC #2260](https://github.com/rust-lang/rfcs/pull/2260). One big problem of `is` is how bindings are made. Without name bindings it is not sufficient to replace `let … else`. 2260 compare `is` with several other languages (C#, Kotlin, TypeScript), but:

- Swift’s `$pat ~= $expr` does not support name binding

- In [C# 7’s `$expr is $pat`](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/is#pattern-matching-with-is), a declaration statement will be inserted before the current statement, i.e. the following two statements are equivalent:

- Kotlin’s smart cast (`$expr is $ty`) and TypeScript’s type guards (e.g. `$expr instanceof $ty`) is not used for pattern matching (destructuring). They alter the type of `$expr` so that type-specific fields will become available.

There is an attempt to create a precise scoping rule in [https://github.com/rust-lang/rfcs/pull/2260#issuecomment-354525996](https://github.com/rust-lang/rfcs/pull/2260#issuecomment-354525996).

---

_[View the full topic](https://internals.rust-lang.org/t/pre-pre-rfc-reviving-refutable-let-runoff/6672)._
