Newsgroups: comp.lang.python Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!post2.news.xs4all.nl!uucp.xs4all.nl!xs4all!spenarnc.xs4all.nl!not-for-mail From: Albert van der Horst Subject: Re: What other languages use the same data model as Python? Date: 20 May 2011 20:56:40 GMT Message-ID: Lines: 41 Organization: Dutch Forth Workshop References: <4dbd1dbf$0$29991$c3e8da3$5496439d@news.astraweb.com> <92f70aF9pqU1@mid.individual.net> Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5875 In article , Chris Angelico wrote: >On Sat, May 7, 2011 at 7:21 PM, Gregory Ewing > 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