Terminology: "reference" versus "pointer"
rurpy at yahoo.com
rurpy at yahoo.com
Sat Sep 12 18:17:07 CEST 2015
Picking a post to respond to, more or less at random...
On Saturday, September 12, 2015 at 9:14:00 AM UTC-6, Rustom Mody wrote:
> On Saturday, September 12, 2015 at 8:11:49 PM UTC+5:30, Laura Creighton wrote:
> > In a message of Sat, 12 Sep 2015 05:46:35 -0700, Rustom Mody writes:
> > >How about lay-English ontology in which "point to" and "refer to" are fairly
> > >synonymous?
> > This I have found is important in teaching, which is why I favour 'bind'
> > and 'binding' -- rather than pointer, pointer, refer to, referring.
> Well we can play humpty dumpty and make any word mean whatever we like.
> However if you are a teacher you will recognize a need for pictures.
> And (as far as I can tell) "Random832" finds a need for the box-n-arrow
> diagrams of classic data-structure books
*The* python data model is a concept that, like all concepts, exist in
human brains. It (and its related terminology) are descriptions agreed
upon by a majority of Python developers, documentors and others. Its
purpose is to explain in a simpler way the behavior of a running Python
It is only one of many possible descriptions. Its value is measured in
how well and efficiently it allows Python programmers to predict the
behavior of a Python program. I never found its presentation in the
Python documentation very understandable or helpful.
Having programmed in C in the past, the model of Python I eventually
developed is very much (I think, haven't read the whole thread) like
Random832's. I think of boxes (objects) with slots containing "pointers"
that "point" to other boxes. Even today when dealing with complex
Python data structures, I draw boxes and arrows to help me understand
them and think of the arrows as "pointers".
Frankly, I feel a little insulted by people who presume that having
learned what a pointer is in C, that my brain is so rigid that I must
necessarily think that pointer means exactly what pointer means in C
forever after. FYI (the general you), I am capable of extracting the
general principle and applying it to Python. Not just capable, but
using the concept from C made understanding Python faster than pretending
that somehow Python has some magical and unique way of structuring data
that's brand new.
Maybe pedagogical research will show that one particular model is more
easily understood by python learners that some other model. But please
keep in mind that learners come in many varieties and that one size will
not fit all. Knowing what a pointer is in C and applying the concept to
model python worked well for me and I would have no hesitation offering
it as an explanation to others as an option to help someone else's
understanding if they, like me, find the official model less then
[*] There is also possibly a "data model" used in specifying the
Python language for implementors but this thread seems to be about
how to describe Python's behavior to users.
More information about the Python-list