the.com/variable
A name pretending to be a value, faking commitment until the program ends.
means Something that can change or take different values; in math and programming, a named placeholder that stands in for a quantity that isn't fixed.
from From Latin variabilis, 'changeable,' built on variare, 'to change or vary,' which itself traces to varius, meaning 'speckled, diverse, many-colored.' So at its root a variable is something dappled and inconstant — the word arrived in English through Old French in the late medieval period, long before it was conscripted into algebra and, later, code.
- named by
- François Viète used letters for math in 1591
- shape-shifter
- holds anything, remembers nothing once reassigned
- naming hell
- the second-hardest problem in computer science
- x marks it
- Descartes picked unknowns from the alphabet's end
global variable in programming — exists throughout entire program execution, accessible from any function
random variable in statistics — assigns numerical values to outcomes of random phenomena, used in probability distributions