Variables

Kirk Job Sluder kirk at jobsluder.net
Sun Apr 24 13:30:22 EDT 2005


Richard Blackwood <richardblackwood at cloudthunder.com> writes:

> Kent Johnson wrote:
> That is exactly how I feel about it. Foo is what it is. Variable, name
> bound to immutable value, etc., what we call it doesn't really change
> how I program, only how I communicate with other programmers (and
> mathematicians). Is the notion of variable not a fundamental concept
> in programming?  Surely there must be an unambiguous definition I can
> relay to him.

Well, if you want to be precise, in python Foo is a pointer that holds
the memory location of an object, that just happens to be int(5). Which
is one of the key differences between computer languages and
mathematics.  The value of a variable does not necessarily have meaning
as a number, but can be a character, string, or reference instead.  If I
say, foo = 'a', then in most cases I'm not really concerned about the
numeric sum of foo + 'b'.

But the argument at stake here is not technical, but linguistic.  If he
insists on imposing a definition from the domain of math onto the domain
of computer programming, then there is no point in continuing the
discussion about how the term "variable" is used in computer programming.  

-- 
Kirk Job-Sluder
"The square-jawed homunculi of Tommy Hilfinger ads make every day an
existential holocaust."  --Scary Go Round



More information about the Python-list mailing list