"variable" seems untypical for rust. We have "bindings", which are not 100% the same as "variables" (hence maybe GP's feeling of something odd).
Value is OK.
Value is OK.
I don't see what's wrong with variable, it's not like Rust does anything special that warrants a different term.
match value {
n @ 0..8 => println!("{n}"),
_ => {},
}
It lets you bind and use the specific value within a matched range.
I don't think I ever used it though, I tend to write something like `n if n<8 => {...}` insteadI recognize the name binding being used there all the time, but maybe variable would work well in this particular context too?
This aligns with the fact that the mutability is (syntactically and conceptually) a property attached to the binding, and hence there is a need to talk about bindings generally without implying anything about the mutability. Lots of languages don’t have immutable bindings, all bindings are mutable, so you may as well call them variables in C, Go, etc.
Mathematics has had immutable variables since long before computers.