Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!usenetcore.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'essentially': 0.04; 'true,': 0.04; 'subject:Python': 0.05; 'tries': 0.05; 'computing,': 0.07; 'indexing': 0.07; 'creator': 0.09; 'operator,': 0.09; 'pointers': 0.09; 'runtime': 0.09; 'subtract': 0.09; 'wrong,': 0.09; 'python': 0.10; 'read.': 0.13; 'missed': 0.15; 'things.': 0.15; 'variables': 0.15; '"thanks': 0.16; 'compiling,': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'k&r': 0.16; 'pointers.': 0.16; 'somewhere.': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; 'language': 0.19; 'saying': 0.22; 'suppose': 0.22; 'am,': 0.23; 'tried': 0.24; 'header:In- Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'sense': 0.26; 'boundaries': 0.29; 'cells': 0.29; 'thinks': 0.29; 'array': 0.29; "i'm": 0.30; 'comments': 0.30; 'guess': 0.31; 'especially': 0.32; 'says': 0.32; 'point': 0.33; "d'aprano": 0.33; 'indexed': 0.33; 'steven': 0.33; 'message-id:@gmail.com': 0.34; 'case,': 0.34; 'except': 0.34; 'but': 0.36; 'there': 0.36; 'url:org': 0.36; 'faster': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'operating': 0.37; 'say': 0.37; 'received:org': 0.37; 'sure': 0.39; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'some': 0.40; 'bring': 0.62; 'charset:windows-1252': 0.62; 'is.': 0.63; 'leaving': 0.63; 'more': 0.63; 'great': 0.63; 'between': 0.65; 'saw': 0.77; 'article': 0.77; 'url:10': 0.79; 'article,': 0.84; 'racing.': 0.84; 'uncertain': 0.84; 'comment.': 0.91; 'url:2013': 0.91 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Tue, 08 Sep 2015 17:55:02 -0600 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Python handles globals badly. References: <86fa425b-d660-45ba-b0f7-3beebdec8e14@googlegroups.com> <55EE9EEC.1060907@rece.vub.ac.be> <55ef0514$0$1655$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: <55ef0514$0$1655$c3e8da3$5496439d@news.astraweb.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1441756515 news.xs4all.nl 23812 [2001:888:2000:d::a6]:41168 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96151 On 09/08/2015 09:56 AM, Steven D'Aprano wrote: > http://exple.tive.org/blarg/2013/10/22/citation-needed/ > > It's a wonderful read. I read this article, but I'm still uncertain to what his point actually is. It's a great review of the history of C, some batch computing, and IBM's CEO's penchant for boat racing. He tries to say that 0-based indexing made for faster compiling, but given the runtime nature of BCPL's ! operator, I don't see how it wouldn't affect runtime also. He also says that saying pointers are the reason for 0-based indexing then you're wrong, except that BCPL's creator says in this same article that array variables are essentially pointers. A few people tried to point this out in the comments but the author simply lambasted them, saying thinks like, "Thanks for leaving a comment. I'm sure it's made you feel clever." Like I say I guess I must have missed his point in there somewhere. I suppose his point is C is 0-based because BCPL was, and I'm sure that's true, but I'm also sure K&R saw some benefits to keeping this in C. In any case, 0-based indexing in Python makes a lot of sense when you bring in the slicing syntax. Especially if you think of slicing as operating on the boundaries between cells as it were. I used a 1-based indexed language (BASIC) for many years, and I was always having to subtract 1 from things. So 0-based is simply more convenient for me.