What other languages use the same data model as Python?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Mon May 9 23:13:12 EDT 2011


On Tue, 10 May 2011 13:49:04 +1200, Gregory Ewing wrote:

> Steven D'Aprano wrote:
> 
>> It's just that the term "variable" is so useful and so familiar that
>> it's easy to use it even for languages that don't have variables in the
>> C/ Pascal/Fortran/etc sense.
> 
> Who says it has to have the Pascal/Fortran/etc sense? Why should static
> languages have a monopoly on the use of the term? That seems like a
> rather languagist attitude!

Established usage. They came first, and outnumber us :/

But I wouldn't quite say they have a monopoly of the term. Where there is 
no risk of misunderstanding, it's fine to use the term. Mathematicians' 
"variable" is different still, but there's very little risk of 
misunderstanding. I'm far less cautious about using "variable" when I'm 
talking to you, because I know you won't be confused, than I would be 
when talking to a newbie, who may be.

When two people use the same words, but their understanding of them are 
slightly different, it's often easier to change the terminology than it 
is to break people's preconceptions and connotations.


> And BTW, applying it to Python is not inconsistent with its usage in
> Pascal. In the technical vocabulary of Pascal, a "variable" is anything
> that can appear on the left hand side of an assignment. The analogous
> term in C is "lvalue".

Sure, but if you think Python "variables" behave like Pascal "variables", 
you'll may be surprised by Python and wonder why integer arguments are 
call by value and list arguments are call by reference...


-- 
Steven



More information about the Python-list mailing list