In article <mailman.1286.1304760534.9059.python-l...@python.org>, Chris Angelico <ros...@gmail.com> wrote: >On Sat, May 7, 2011 at 7:21 PM, Gregory Ewing ><greg.ew...@canterbury.ac.nz> wrote: >> Hans Georg Schaathun wrote: >> >>> You cannot reference nor manipulate a reference in python, and that IMHO >>> makes them more abstract. >> >> You can manipulate them just fine by moving them >> from one place to another: > >I think "manipulate" here means things like pointer arithmetic, which >are perfectly normal and common in C and assembly, but not in >languages where they're references.
Adding an integer to a reference to an array element could have been perfectly well-defined in Algol: ref real operator+(ref real, int) That is called overloading of the plus operator not "pointer arithmetic". It is a misconception that these manipulation are dirty or ill-defined or unsafe. A similar extension would be possible in Python. Allusion to assembler where one adds a number to a register and can't tell whether the register contains an address or data are misleading. [This is not to say that I think it is advisable]. > >Chris Angelico Groetjes Albert. -- -- Albert van der Horst, UTRECHT,THE NETHERLANDS Economic growth -- being exponential -- ultimately falters. albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst -- http://mail.python.org/mailman/listinfo/python-list