Re: What other languages use the same data model as Python?



On Thu, 05 May 2011 07:43:59 +1000, Ben Finney wrote:

‘x’ is a name. Names are bound to values. Talk of “variable” only
confuses the issue because of the baggage carried with that term.

But to use 'name' as a complete replacement for 'variable',
you have to stretch it to include things like a[i], b.c,
e.f(x).g[i:j].k, etc. which goes rather a long way beyond
the everyday meaning of the word.

In Python I use 'variable' to mean more or less 'something
that can be assigned to', which accords with the way it's
used in relation to many other languages, and doesn't
suggest any restriction to things named by a single
identifier.

But the data model of Python doesn't fit well with the ideas that the
term “variable” connotes for most programmers:

Seems to me that anyone taking that connotation from it
has not yet been sufficiently educated about the Python
data model itself. Part of explaining that data model
consists of instilling the very idea that the things in
Python that are analogous to variables in other languages
only refer to data rather than containing the actual data.

Saying “variable” and “has the value”

But I don't say "has a value", I say "refers to".

--
Greg
.



Relevant Pages

  • Re: In a bit of a pickle here :)
    ... The more i've used python, ... > think I really dont need a relational data model at all. ... How do you handle versioning of objects with pickle? ... Subversion even have Python bindings. ...
    (comp.lang.python)
  • Re: What other languages use the same data model as Python?
    ... C++ has a data model for class variables similar ... In C# and Python, elementary types are immutable objects, byut thet ... Fortran termininology) are bound to the same objects with which the ... A reference in C++ and Fortran is an alias for the variable ...
    (comp.lang.python)
  • Re: What other languages use the same data model as Python?
    ... Now, this is different from languages like C and Pascal, which is ... Python and Ruby have the same ... While Guido does not, that I know of, credit CLU as Python's direct inspiration, I think it as the originator of Python's data model. ... That is why I think it is better to think of Python as an algorithm language or information-object manipulation language rather than as just a linear-memory machine language. ...
    (comp.lang.python)
  • What other languages use the same data model as Python?
    ... Now, this is different from languages like C and Pascal, which is based ... "Python's data model is different from other languages" ... Python and Ruby have the same data model. ... because I believe that Emerald ...
    (comp.lang.python)
  • Re: Static Typing in Python
    ... > Perhaps you should read the following where Guido van Rossum talks about ... > typing in Python. ... Here he is contrasting strongly typed languages with ... The object data model of Python ...
    (comp.lang.python)