# How about a new operator?

**URL:** <https://internals.rust-lang.org/t/how-about-a-new-operator/17322>\
**Category:** language design\
**Created:** [September 2, 2022, 9:25am UTC](https://internals.rust-lang.org/t/how-about-a-new-operator/17322 "2022-09-02T09:25:53Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![scottmcm](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/scottmcm/32/2355_2.png) [@scottmcm](https://internals.rust-lang.org/u/scottmcm)\
**Post date:** [September 2, 2022, 10:05pm UTC](https://internals.rust-lang.org/t/how-about-a-new-operator/17322/11 "2022-09-02T22:05:54Z")

</div>

> [@cklein](#):
>
> Let c = a?.b?.c ?? d:

Someone mentioned `try` already, but to elaborate, with the [new desugar scheme I'm working on](https://github.com/scottmcm/rust/commit/experiment-new-try-block-v2), that would be

```rust
let c = try { a?.b?.c }.unwrap_or(d);

```

(assuming `d` is not itself also an `Option`.)

I actually like that better than C#'s `?.`, because in C# that occasionally does something weird because it has a slightly-magic scope -- `a?.b.Foo()` and `(a?.b).Foo()` do something different, even though there's no _precedence_ reason for the parens there. Having the block written directly in the form thus, I think, fits better for the Rust form.

But I _would_ like to see [Something for coalescing; aka generalized/improved `or_else`](https://internals.rust-lang.org/t/something-for-coalescing-aka-generalized-improved-or-else/9295).

---

_[View the full topic](https://internals.rust-lang.org/t/how-about-a-new-operator/17322)._
