rust-lang / rust-lang/rfcs

Rust doesn't support x₁ and x₂ identifiers while C++ does.

Open
#3,402 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T-lang
Dominant language
Markdown
Stars
6.6k
Forks
1.7k
Avg merge
16h 14m
Merged PRs (30d)
1

Description

Most C++ compilers supported x₁ and x₂ as valid identifiers since addition of Unicode support: https://godbolt.org/z/zhGzTKjeK

Clang dropped that support in version 14 but it was restored in version 16 when “Mathematical notation profile for default identiers” ( https://www.unicode.org/L2/L2022/22230-math-profile.pdf ) was adopted.

Would it make sense for Rust to adopt it, too?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked Godbolt example and Unicode mathematical notation profile, then review the discussion in this RFC issue. Determine whether adopting the identifier profile warrants a Rust RFC; done would require a decided proposal with clear scope rather than an implementation patch.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.