Pass by reference ?
Nick Maclaren
nmm1 at cus.cam.ac.uk
Wed Apr 5 13:07:30 EDT 2000
In article <38EB6797.F03EEFB3 at roguewave.com>, Bjorn Pettersen <bjorn at roguewave.com> writes:
|>
|> Call by reference is (at least now) generally used to refer to Pascal
|> VAR arguments or C++ & arguments, both of which has similar semantics
|> which allow rebinding in the caller's scope. This is in contrast to
|> many OO languages where arguments can be mutated but not rebound... I'm
|> not sure if call-by-reference has changed meaning since the 60s, but
|> pass/call-by-object-reference is the term consistently used when I was
|> doing my type theory work in 85-87...
Pascal VAR arguments don't involve actual rebinding - the method
that I was thinking of would (in Python terms) permit the called
function to change the caller's identifier from pointing to a tuple
to pointing to a dictionary. Upon return, the caller would see the
new object.
|> Just because something is a bad idea doesn't mean you can't get a
|> research grant for it <wink>
True. I knew some that were for developing a program to solve
the Halting Problem ....
Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email: nmm1 at cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679
More information about the Python-list
mailing list