Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed1a.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.016 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'languages,': 0.04; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'bug': 0.12; 'braces?': 0.16; 'bug,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'syntax,': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'stefan': 0.19; 'meant': 0.20; 'programming': 0.22; 'header:User-Agent:1': 0.23; 'merge': 0.24; 'received:comcast.net': 0.24; 'url:02': 0.24; "haven't": 0.24; 'looks': 0.24; 'mention': 0.26; 'this:': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'wonder': 0.29; "i'm": 0.30; 'code': 0.31; 'accidentally': 0.31; 'indentation': 0.31; 'handled': 0.32; 'quite': 0.32; 'subject:the': 0.34; 'but': 0.35; 'url:org': 0.36; 'two': 0.37; 'list': 0.37; 'being': 0.38; 'skip:& 10': 0.38; 'apple': 0.38; 'to:addr:python-list': 0.38; 'recent': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'read': 0.60; 'details.': 0.61; 'such': 0.63; 'due': 0.66; 'obvious': 0.74; 'article': 0.77; 'goto': 0.84; 'url:2014': 0.84; 'poorly': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ned Batchelder Subject: Re: why indentation should be part of the syntax Date: Sun, 02 Mar 2014 07:36:31 -0500 References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: c-50-133-228-126.hsd1.ma.comcast.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1393763808 news.xs4all.nl 2852 [2001:888:2000:d::a6]:45850 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67433 On 3/2/14 5:41 AM, Stefan Behnel wrote: > Haven't seen any mention of it on this list yet, but since it's such an > obvious flaw in quite a number of programming languages, here's a good > article on the recent security bug in iOS, which was due to accidentally > duplicated code not actually being as indented as it looked: > > https://www.imperialviolet.org/2014/02/22/applebug.html > > Stefan > As much as I like indentation as syntax, and am amused by this bug, I'm not sure we can chalk it all up to space-vs-brace. After all, who would have wanted two goto's in a row even with braces? It's not like there's some engineer at Apple who meant for the code to read like this: if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) { goto fail; goto fail; } This looks to me like a poorly handled merge conflict maybe? I wonder if we'll ever get the details. -- Ned Batchelder, http://nedbatchelder.com