News for hackers. Stuff that matters.
Re:Rust: A Unique Perspective by cormacrelf on Friday February 10, 2023 @07:56AM (#34739030)
The reason people say binding is because the words “immutable variable” are an oxymoron. It never makes sense to use variable for immutable bindings; they are not able to be varied. Binding is just the meaning of the word “variable” but without the implied mutability.

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.

Re:Rust: A Unique Perspective by orbital223 on Friday February 10, 2023 @09:32AM (#34740068)
> The reason people say binding is because the words “immutable variable” are an oxymoron.

Mathematics has had immutable variables since long before computers.

Re:Rust: A Unique Perspective by tuukkah on Friday February 10, 2023 @10:08AM (#34740592)
"Immutable variable" is not an oxymoron, because the value of a variable can and typically will vary via other means than mutation. The value of a variable is potentially different every time it comes to scope, e.g. whenever a function is called.
Re:Rust: A Unique Perspective by alpaca128 on Friday February 10, 2023 @06:46PM (#34747674)
Even immutable variables can be just redefined/shadowed. You can't do that with constants.
Re:Rust: A Unique Perspective by tuukkah on Saturday February 11, 2023 @02:37AM (#34750388)
Usually, you think of the shadowing variable and the shadowed variable as different variables though. They just happen to use the same variable name.
Re:Rust: A Unique Perspective by kzrdude on Saturday February 11, 2023 @07:06AM (#34751629)
I think you're right that this is the reason why some people avoid that.