# Idea: Simpler method-syntax private helpers

**URL:** <https://internals.rust-lang.org/t/idea-simpler-method-syntax-private-helpers/7460>\
**Category:** language design\
**Created:** [May 6, 2018, 9:59pm UTC](https://internals.rust-lang.org/t/idea-simpler-method-syntax-private-helpers/7460 "2018-05-06T21:59:35Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Centril](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/centril/32/3334_2.png) [@Centril](https://internals.rust-lang.org/u/Centril)\
**Post date:** [May 6, 2018, 11:31pm UTC](https://internals.rust-lang.org/t/idea-simpler-method-syntax-private-helpers/7460/3 "2018-05-06T23:31:10Z")

</div>

A simpler (from the user’s perspective), but more radical approach could be to change the method call syntax resolution algorithm such that when resolving:

```rust
receiver.method(args..)

```

if every resolution method (inherent impls, trait methods) fails, the compiler will look for a free function in scope:

```rust
method(receiver, args...)

```

This requires zero changes to user code, and it should be backwards compatible since it is used as a fallback.

Another addition, for when the function is not in scope is to allow the caller to write:

```rust
receiver.path::to::method(args..)

```

This also has benefits for traits.

```rust
receiver.Itertools::flatten()

```

The first proposed mechanism has the following benefits:

- It is general
- It requires no changes to user code

It has the following drawbacks:

- It could lead to questions for an unsuspecting reader:

Unresolved questions:

- Does this interact in weird ways with Deref-coersion?

---

_[View the full topic](https://internals.rust-lang.org/t/idea-simpler-method-syntax-private-helpers/7460)._
