Variables
Robert Kern
rkern at ucsd.edu
Sat Apr 23 23:35:55 EDT 2005
Richard Blackwood wrote:
> Indeed, this language is math. My friend says that foo is a constant and
> necessarily not a variable. If I had written foo = raw_input(), he would
> say that foo is a variable. Which is perfectly fine except that he
> insists that since programming came from math, the concept of variable
> is necessarily the identical. This can not be true. For example, I may
> define foo as being a dictionary, but I can not do this within math
> because there is no concept of dictionaries within mathematics; yet foo
> is a variable, a name bound to a value which can change.
Your friend needs to learn, and very quickly if he persists in
inflicting his erroneous pedantry on other people, that technical terms
have different meanings in different fields, even if one can imagine
that one "came from" the other. Hell, even in the same field, it can
mean different things. Ask him what "domain" means in mathematics. And
check his answer[1].
While one could argue that using the term "variable" for Python names is
incorrect for good programming reasons, your friend's reasoning is
ridiculous.
[1] http://mathworld.wolfram.com/Domain.html
--
Robert Kern
rkern at ucsd.edu
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
More information about the Python-list
mailing list