# Reserving more keywords

**URL:** <https://internals.rust-lang.org/t/reserving-more-keywords/22212>\
**Category:** language design\
**Created:** [January 23, 2025, 7:01am UTC](https://internals.rust-lang.org/t/reserving-more-keywords/22212 "2025-01-23T07:01:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![binarycat](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/binarycat/32/12210_2.png) [@binarycat](https://internals.rust-lang.org/u/binarycat)\
**Post date:** [January 23, 2025, 7:01am UTC](https://internals.rust-lang.org/t/reserving-more-keywords/22212/1 "2025-01-23T07:01:07Z")

</div>

I see a lot of language design proposal, both here and as rfcs...

and almost all of them repurpose existing keywords instead of introducing new ones.

this is one of the main reasons editions exist.

this could possibly be mitigated by having the next edition immediately available on nightly.

Reusing keywords/syntax is bad for discoverabilty. This is how you get the mess that is C++, where f(x) can mean at least 3 different things.

---

<div class="post-metadata">

**Author:** ![josh](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/josh/32/5934_2.png) [@josh](https://internals.rust-lang.org/u/josh)\
**Post date:** [January 23, 2025, 8:47am UTC](https://internals.rust-lang.org/t/reserving-more-keywords/22212/2 "2025-01-23T08:47:36Z")

</div>

We can absolutely add new keywords in a new edition. But if we do that, people on older editions who want to use the same feature need to use syntax like `k#newkeyword`. (Which is better than not having the feature at all, but still, it's not ideal.)

We should still do that in any case where a new keyword makes code clearer. We shouldn't reuse existing keywords where they don't fit. But if an existing keyword is _clear_ for a use case, it's worth considering.

---

<div class="post-metadata">

**Author:** ![Neutron3529](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/neutron3529/32/6976_2.png) [@Neutron3529](https://internals.rust-lang.org/u/Neutron3529)\
**Post date:** [January 23, 2025, 8:49am UTC](https://internals.rust-lang.org/t/reserving-more-keywords/22212/3 "2025-01-23T08:49:09Z")

</div>

Maybe we need something like `${kw}` rather than write the keyword directly.

Discussion about keyword makes no sense before we decide whether to accept the new grammar.

Maybe we should regard all the keyword in RFCs as something like `${kw}`. Only after the RFC is accepted (and thus lots of people knows the keyword), the discussion of real keyword could be started.

---

<div class="post-metadata">

**Author:** ![steffahn](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/steffahn/32/13288_2.png) [@steffahn](https://internals.rust-lang.org/u/steffahn)\
**Post date:** [January 23, 2025, 3:37pm UTC](https://internals.rust-lang.org/t/reserving-more-keywords/22212/4 "2025-01-23T15:37:08Z")

</div>

> [@binarycat](#):
>
> Reusing keywords/syntax is bad for discoverabilty.

As a (minor, but still illustrative) example: Just recently, someone in the forums [was confused](https://users.rust-lang.org/t/what-is-use/124079) by `use` gaining a new meaning.

Apparently, they had _even found_ the relevant std docs page for keyword `use` already, but it wasn’t structured in a way that made sufficiently clear – at a glance – that it’s a page describing two completely separate and unrelated language features on the same page.

---

<div class="post-metadata">

**Author:** ![CAD97](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/cad97/32/3460_2.png) [@CAD97](https://internals.rust-lang.org/u/CAD97)\
**Post date:** [January 23, 2025, 4:20pm UTC](https://internals.rust-lang.org/t/reserving-more-keywords/22212/5 "2025-01-23T16:20:36Z")

</div>

Two placeholders I've seen used before are `k#eyword` and `☃`. But unfortunately​, syntax _is_ important to the legibility of a feature, and it's rarely as simple as just putting off a single keyword choice.

---

<div class="post-metadata">

**Author:** ![Vorpal](https://avatars.discourse-cdn.com/v4/letter/v/aca169/32.png) [@Vorpal](https://internals.rust-lang.org/u/Vorpal)\
**Post date:** [January 23, 2025, 4:29pm UTC](https://internals.rust-lang.org/t/reserving-more-keywords/22212/6 "2025-01-23T16:29:09Z")

</div>

> [@josh](#):
>
> But if we do that, people on older editions who want to use the same feature need to use syntax like `k#newkeyword`. (Which is better than not having the feature at all, but still, it's not ideal.)

So, if you use the new feature you need to depend on a new enough rust version for it to exist. And then you might as well also upgrade to the newer edition.

There is the (niche?) use case of optionally enabling support for whatever the keyword is behind a feature flag. But with the new MSRV aware resolver there should be less need to avoid bumping MSRV.

(Also I'm of the opinion that staying on old versions actually hurts you more than it helps, especially for a project with as good compatibility as Rust. And it seems very arbitrary to want to upgrade libraries but use an old compiler. Why not new of both or old of both? Or why not old libraries on a new compiler? Why are people scared of compiler upgrades specifically?)

---

<div class="post-metadata">

**Author:** ![Neutron3529](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/neutron3529/32/6976_2.png) [@Neutron3529](https://internals.rust-lang.org/u/Neutron3529)\
**Post date:** [January 24, 2025, 2:52am UTC](https://internals.rust-lang.org/t/reserving-more-keywords/22212/7 "2025-01-24T02:52:24Z")

</div>

> [@CAD97](#):
>
> syntax _is_ important to the legibility of a feature

Syntax is important, thus we need more concern about that, and we need a last effort to rescue a not-so-proper keyword.

For any RFC, we always have 3 questions:

1. What syntax are we proposed.
2. Why the syntax is important and how it help users writting Rust programs.
3. How to implement it / is it worth implement it?

In case the syntax is actually useless, or that syntax is impossible to implement, just discuss about _what the syntax is_ makes no sense. Thus it might be better to focus on the usage and the cost first, as for what the syntax actually is, it might be better to discuss it later.

Only after enough users know how the syntax helps them write Rust programs, will a good-enough syntax be picked out.

---

<div class="post-metadata">

**Author:** ![binarycat](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/binarycat/32/12210_2.png) [@binarycat](https://internals.rust-lang.org/u/binarycat)\
**Post date:** [January 25, 2025, 7:25pm UTC](https://internals.rust-lang.org/t/reserving-more-keywords/22212/8 "2025-01-25T19:25:48Z")

</div>

I think it's better to have the feature be hard to read on old editions than to make it hard to read and research on all editions.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [July 19, 2026, 7:26pm UTC](https://internals.rust-lang.org/t/reserving-more-keywords/22212/9 "2026-07-19T19:26:42Z")

</div>

This topic was automatically closed 540 days after the last reply. New replies are no longer allowed.
