Do you have a quick example for a situation where binding is better than variable in Rust?
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.