3 ms·
> (5) Rust has "immutable variables". Seriously? How can an object be both variable and immutable? Variables have been called variables since the dawn of time,
by the_why_of_y 10y ago
> (5) Rust has "immutable variables". Seriously? How can an object be both variable and immutable?
Variables have been called variables since the dawn of time, i.e., the lambda calculus, which doesn't even have assignment. The name derives from the idea that for every invocation of a function, a variable in its definition may be bound to a different value, hence it "varies" at runtime.
- dbaupp 10y agoFurthermore, it's terminology from mathematics, where, just like the lambda calculus, mutation isn't a thing: https://en.wikipedia.org/wiki/Variable_(mathematics) https://en.wikipedia.org/wiki/Variable_(mathematics)