Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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; 'python.': 0.02; 'algorithm': 0.04; 'broken': 0.04; 'english.': 0.04; 'deny': 0.07; 'processing.': 0.07; 'removes': 0.07; '*is*': 0.09; 'english,': 0.09; 'formatting': 0.09; 'lost.': 0.09; 'percentage': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'spaces': 0.09; 'subject:design': 0.09; 'width': 0.09; 'worse': 0.09; 'wrong,': 0.09; 'python': 0.11; 'jan': 0.12; 'language.': 0.14; 'books': 0.15; 'braces': 0.16; 'braces,': 0.16; 'code?': 0.16; 'formatting.': 0.16; 'indent': 0.16; 'materially': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'routinely': 0.16; 'spacing': 0.16; 'subject:Language': 0.16; 'tab': 0.16; 'tabs': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'seems': 0.21; '>>>': 0.22; 'header:User- Agent:1': 0.23; 'headers': 0.24; 'mathematical': 0.24; 'text,': 0.24; 'source': 0.25; 'header:X-Complaints-To:1': 0.27; 'header :In-Reply-To:1': 0.27; 'point': 0.28; 'fixed': 0.29; 'chris': 0.29; "we'd": 0.29; 'am,': 0.29; 'along': 0.30; 'code': 0.31; 'getting': 0.31; 'that.': 0.31; 'usually': 0.31; '13,': 0.31; "d'aprano": 0.31; 'follows': 0.31; 'indentation': 0.31; 'sep': 0.31; 'steven': 0.31; 'text': 0.33; 'fri,': 0.33; 'plain': 0.33; "i'd": 0.34; 'info': 0.35; 'but': 0.35; 'there': 0.35; '+0200,': 0.36; 'like,': 0.36; 'changing': 0.37; 'being': 0.38; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'extremely': 0.39; 'structure': 0.39; 'delete': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'up,': 0.60; 'lost': 0.61; 'received:173': 0.61; 'making': 0.63; 'information': 0.63; 'more': 0.64; 'believe': 0.68; 'statement,': 0.68; 'respect': 0.70; 'published': 0.71; 'unusual': 0.74; 'restore': 0.78; 'pardon': 0.84; 'received:fios.verizon.net': 0.84; 'prone': 0.91; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Language design Date: Fri, 13 Sep 2013 15:32:00 -0400 References: <522eb795$0$29999$c3e8da3$5496439d@news.astraweb.com> <5232e562$0$29988$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 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: 59 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1379100735 news.xs4all.nl 16004 [2001:888:2000:d::a6]:52725 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:54132 On 9/13/2013 7:16 AM, Chris Angelico wrote: > On Fri, Sep 13, 2013 at 8:13 PM, Steven D'Aprano > wrote: >> On Fri, 13 Sep 2013 09:04:06 +0200, Antoon Pardon wrote: >>> Not only that. There are a lot of python code snippets on the net that >>> for whatever reason lost their indentation. There is no algorithm that >>> can restore the lost structure. I believe tabs are worse than spaces with respect to getting lost. >> Is there an algorithm that will restore the lost structure if you delete >> all the braces from C source code? >> >> Perhaps if web sites and mail clients routinely deleted braces, we'd see >> the broken-by-design software being fixed instead of blaming the language. > > While I don't deny your statement, I'd like to point out that English > usually isn't overly concerned with formatting. Poetry, including that in English, often *is* concerned with formatting. Code is more like poetry than prose. > You can take this > paragraph of text, unwrap it, and then reflow it to any width you > like, without materially changing my points. But you cannot do that with poetry! Or mathematical formulas. Or tables. Or text with headers and paragraphs and indented quotations. Etc. What percentage of published books on your bookshelf have NO significant indentation? As far as I know for mine, it is 0. > C follows a rule of English which you just made up, and which is drastically wrong, > which Python breaks, > ergo software designed to cope only with English impoverished plain unformatted prose > can better cope with C code than with Python code. Software that removes formatting info is broken for English as well as Python. > Python is extremely unusual in making indentation > important information You have it backwards. Significant indentation is *normal* in English. C in unusual is being able to write a whole text on a single line. When I was a child, paragraphs were marked by tab indents. The change to new-fangled double spacing with no indent seems to have come along with computer text processing. Perhaps this is because software is more prone to dropping tabs that return characters. -- Terry Jan Reedy