&mut is really a Mutant Reference! 😁
⚓ Rust 📅 2026-02-09 👤 surdeus 👁️ 6As a newbie reading rust lang book, at about 7th time, after the book says '&mut is a mutable reference', and after about an hour reading all the other newbies before me, stumbling and complaining about the same fact, that rust lang is silently overriding 40 years of 'mutable reference' semantics like this, and that rust '&mut' is really none of these:
C/C++
const T* const a; // can't mutate either
const T* a; // can't mutate what is pointed to
T* const a; // can't mutate pointer
T* a; // can mutate both
I propose a better name: &mut is really a Mutant Reference! ![]()
And a little footnote in the rust lang book relevant chapter:
"A Mutant Reference really means exclusive access, blah, blah, blah".
The name comes with real benefits:
- it is fun, and will create lots of great memes
- any newbie will instantly recognized that 'mutant' is not 'mutable'
- it will save zillions of newbie man-hours in the next 100 years or rust
I hope that the "Rust People" will consider this brilliant idea very seriously. ![]()
5 posts - 4 participants
🏷️ Rust_feed