Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #64208
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Subject | Re: Python 3.x adoption |
| Date | 2014-01-17 20:01 -0500 |
| Organization | IISS Elusive Unicorn |
| References | <lb434o$na8$1@speranza.aioe.org> <mailman.5472.1389728319.18130.python-list@python.org> <3f88a958-4f3f-476c-bc9f-1b38ac0d084b@googlegroups.com> <lbccsb$m7d$1@ger.gmane.org> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5667.1390006920.18130.python-list@python.org> (permalink) |
On Fri, 17 Jan 2014 18:03:45 -0500, Terry Reedy <tjreedy@udel.edu>
declaimed the following:
>Not mentioned in the wiki article is the change in calling convention
>from call by value to call by reference (or maybe the opposite). I
>remember a program crashing because of this when I tried it with F77.
>
Maybe because there was NO change in calling convention. FORTRAN was
call by reference in all versions I've worked with. DEC did add special
"functions" to force a parameter to be passed as "value", "reference", or
"descriptor" -- mostly to interface with other languages (descriptor is
what was used for character strings -- basically a structure containing the
length of the string/buffer, and the address of said buffer).
However, one may have encountered an implementation that did some
checking for duplicated parameter addresses -- or may have behaved
internally as a value/return system, wherein the by-reference parameters
were copied to local/stack storage, manipulated, and only written back to
the reference address on exit. That would result in differences:
a = 1
call xyz(a, b, a)
subroutine xyz(x, y, z)
x = x + 1
z = z * 2
...
In a true by-reference system, "a" would turn into 2 for the first
assignment, but then turn into 4 after the second.
In value/return, the second assignment still sees "1" and results in
"2", and thereby "a" becomes "2", not "4"...
I'd still consider a value/return scheme to be a misbehaving FORTRAN.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python 3.x adoption Staszek <noreply@eisenbits.com> - 2014-01-14 20:33 +0100
Re: Python 3.x adoption Skip Montanaro <skip@pobox.com> - 2014-01-14 13:38 -0600
Re: Python 3.x adoption beliavsky@aol.com - 2014-01-17 14:16 -0800
Re: Python 3.x adoption Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-17 22:51 +0000
Re: Python 3.x adoption Terry Reedy <tjreedy@udel.edu> - 2014-01-17 18:03 -0500
Re: Python 3.x adoption beliavsky@aol.com - 2014-01-18 05:27 -0800
Re: Python 3.x adoption Travis Griggs <travisgriggs@gmail.com> - 2014-01-21 11:04 -0800
Re: Python 3.x adoption Chris Kaynor <ckaynor@zindagigames.com> - 2014-01-21 11:15 -0800
Re: Python 3.x adoption Chris Angelico <rosuav@gmail.com> - 2014-01-22 06:25 +1100
Re: Python 3.x adoption MRAB <python@mrabarnett.plus.com> - 2014-01-17 23:12 +0000
Re: Python 3.x adoption Chris Angelico <rosuav@gmail.com> - 2014-01-18 10:17 +1100
Re: Python 3.x adoption Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-01-17 20:01 -0500
Re: Python 3.x adoption Ben Finney <ben+python@benfinney.id.au> - 2014-01-18 12:18 +1100
Re: Python 3.x adoption Ben Finney <ben+python@benfinney.id.au> - 2014-01-18 12:27 +1100
Re: Python 3.x adoption Chris Angelico <rosuav@gmail.com> - 2014-01-15 06:44 +1100
Re: Python 3.x adoption Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-15 02:55 +0000
Re: Python 3.x adoption MRAB <python@mrabarnett.plus.com> - 2014-01-15 03:30 +0000
Re: Python 3.x adoption Travis Griggs <travisgriggs@gmail.com> - 2014-01-15 07:43 -0800
Re: Python 3.x adoption Piet van Oostrum <piet@vanoostrum.org> - 2014-01-16 13:57 +0100
Re: Python 3.x adoption Chris Angelico <rosuav@gmail.com> - 2014-01-16 03:14 +1100
Re: Python 3.x adoption Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-15 16:46 +0000
Re: Python 3.x adoption Chris Angelico <rosuav@gmail.com> - 2014-01-16 04:08 +1100
Re: Python 3.x adoption Christopher Welborn <cjwelborn@live.com> - 2014-01-15 11:37 -0600
Re: Python 3.x adoption Grant Edwards <invalid@invalid.invalid> - 2014-01-17 15:27 +0000
Re: Python 3.x adoption Tim Chase <python.list@tim.thechases.com> - 2014-01-17 10:15 -0600
Re: Python 3.x adoption Grant Edwards <invalid@invalid.invalid> - 2014-01-17 20:02 +0000
Re: Python 3.x adoption Roy Smith <roy@panix.com> - 2014-01-17 21:49 -0500
Re: Python 3.x adoption Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-17 16:21 +0000
Re: Python 3.x adoption Terry Reedy <tjreedy@udel.edu> - 2014-01-17 17:10 -0500
csiph-web