What other languages use the same data model as Python?

Hans Georg Schaathun hg at schaathun.net
Mon May 9 02:23:40 EDT 2011


On Sat, 07 May 2011 21:21:45 +1200, Gregory Ewing
  <greg.ewing at canterbury.ac.nz> wrote:
:  You can manipulate them just fine by moving them
:  from one place to another:
: 
:      a = b
: 
:  You can use them to get at stuff they refer to:
: 
:      a = b.c
:      a[:] = b[:]

Surely you can refer to the objects, but you cannot refer to
the reference.

:  You can compare them:
: 
:      if a is b:
:         ...

This could be implemented as pointer comparison, but it is not
defined as such and there is no requirement that it be.

:  That's about all you can do with pointers in Pascal,
:  and I've never heard anyone argue that Pascal pointers
:  are any more or less abstract than any other piece of
:  data in that language.

In Pascal a pointer is a distinct data type, and you can have variables
of a given type or of type pointer to that given type.  That makes the
pointer a concrete concept defined by the languagedefined by the
language.

-- 
:-- Hans Georg



More information about the Python-list mailing list