Variables and Mutability - The Rust Programming Language
Variables and Mutability - The Rust Programming Language
5
公开标注数
5
参与人数
2026-07-21 09:47:09
首次 Whisper
讨论活跃度
doc.rust-lang.org 近 17 周的公开 Whisper
少多
最新公开 Whisper
划选高亮2026-07-21 13:08:09
原文高亮摘录
“Shadowing is different from marking a variable as mut”
Whisper 随想笔记
Wait, so I can't accidentally reassign unless I use let? That's actually pretty neat.
划选高亮2026-07-21 12:59:09
原文高亮摘录
“Shadowing is different from marking a variable as mut”
Whisper 随想笔记
So shadowing keeps the variable immutable after transforms, nice safety net.
划选高亮2026-07-21 10:05:09
原文高亮摘录
“variables are immutable. This is one of many nudges Rust gives you”
Whisper 随想笔记
Rust's nudges are more like gentle prods, and honestly, they grow on you.
划选高亮2026-07-21 09:56:09
原文高亮摘录
“variables are immutable. This is one of many nudges Rust gives you”
Whisper 随想笔记
I get the safety angle, but sometimes you just need a counter without all the fuss.
划选高亮2026-07-21 09:47:09
原文高亮摘录
“variables are immutable. This is one of many nudges Rust gives you”
Whisper 随想笔记
Immutability by default feels restrictive at first, but it really does catch bugs early.