Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'wiki': 0.03; 'parameters': 0.04; 'subject:Python': 0.06; 'assignment': 0.07; 'convention.': 0.07; 'parameter': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'second.': 0.09; 'storage,': 0.09; 'jan': 0.12; 'mostly': 0.14; '"a"': 0.16; 'exit.': 0.16; 'internally': 0.16; 'message-id:@4ax.com': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'sees': 0.16; 'subroutine': 0.16; 'thereby': 0.16; 'wherein': 0.16; 'basically': 0.19; 'written': 0.21; 'copied': 0.24; 'url:home': 0.24; 'versions': 0.24; '(or': 0.24; "i've": 0.25; 'second': 0.26; 'header:X-Complaints-To:1': 0.27; 'tried': 0.27; 'character': 0.29; 'dec': 0.30; 'languages': 0.32; 'interface': 0.32; 'worked': 0.33; 'addresses': 0.33; 'becomes': 0.33; 'checking': 0.33; 'fri,': 0.33; 'maybe': 0.34; "i'd": 0.34; 'but': 0.35; 'add': 0.35; 'there': 0.35; 'scheme': 0.36; 'charset:us-ascii': 0.36; 'turn': 0.37; 'system,': 0.38; 'convention': 0.38; 'to:addr :python-list': 0.38; 'structure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'length': 0.61; 'mentioned': 0.61; 'first': 0.61; 'back': 0.62; 'address': 0.63; '>from': 0.68; 'results': 0.69; 'containing': 0.69; 'special': 0.74; 'article': 0.77; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Python 3.x adoption Date: Fri, 17 Jan 2014 20:01:53 -0500 Organization: IISS Elusive Unicorn References: <3f88a958-4f3f-476c-bc9f-1b38ac0d084b@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-79-216-82.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 41 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1390006920 news.xs4all.nl 2907 [2001:888:2000:d::a6]:58673 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64208 On Fri, 17 Jan 2014 18:03:45 -0500, Terry Reedy 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/