Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!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.140 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.72; '*S*': 0.00; 'subject:Python': 0.07; 'sat,': 0.13; 'braces': 0.16; 'declarations': 0.16; 'explicit': 0.16; 'grasp': 0.16; 'humans': 0.16; 'programmers,': 0.16; 'typed': 0.16; 'language': 0.17; 'portion': 0.18; 'sections': 0.18; 'fri,': 0.18; 'programming': 0.21; 'wrote:': 0.21; 'exception': 0.22; 'preference': 0.22; 'unknown': 0.22; 'header :In-Reply-To:1': 0.22; 'variable': 0.27; 'message- id:@mail.gmail.com': 0.27; 'language.': 0.27; 'seems': 0.28; "i've": 0.28; 'pm,': 0.28; 'that.': 0.28; 'implicit': 0.29; 'code': 0.29; "doesn't": 0.30; 'character': 0.30; 'received:209.85': 0.32; 'received:209.85.210': 0.32; 'chris': 0.32; 'received:google.com': 0.32; 'definition': 0.32; 'fairly': 0.32; 'received:209': 0.35; 'there': 0.35; 'should': 0.35; 'actually': 0.35; "i'm": 0.36; 'text': 0.36; 'but': 0.36; 'languages': 0.37; 'too.': 0.37; 'them,': 0.39; 'clear': 0.39; 'being': 0.39; 'to:addr:python-list': 0.39; 'either': 0.39; 'large': 0.40; 'to:addr:python.org': 0.40; 'your': 0.60; 'mar': 0.61; 'type': 0.62; 'world': 0.65; 'personal': 0.65; 'frequently': 0.66; '2012': 0.69; '30,': 0.70; 'gain': 0.72; 'natural': 0.74; 'blocks': 0.84; 'imagining': 0.84; 'indented': 0.84; 'naked': 0.84; 'nathan': 0.84; 'notion': 0.84; 'acknowledge': 0.91; 'same,': 0.91; 'demand': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=8Mk+C03PbXRTQ9aIEEb3XFY003avv32MjDwktnUt+CE=; b=i9eR3RdtV0Ai6e1Zrd3K1Mf3Dx7exmpBcOIDzeeFGP24UIfCp438sxUt1uLiJSqQE2 Jv8iCHoNPetC9fTUY7LxMLrhFxzMcCWfr85+YQeVVdV+xZuo6VdIzuBV5wHnnoqcpf/b zoPE9C/H3c4VHhJN7bdxWJtjExPmBD+xDlCL+Hrhp6ugyF/b7zBOIAg4Ab/3XEk8QsIq DhIADuwT78/WbjgESQLM82d55vKT+zeFnzvkQlO05J7dtgaTDW+HNDU5F8TS3UzUau7N jxMBM4mei8FhM3xC0iwgXsViH9Xp/9xt+qMz8uCGU0laBp+n9MedeSQK1KrTacricLhD Jqkw== MIME-Version: 1.0 In-Reply-To: References: <4f612b19$0$1379$4fafbaef@reader2.news.tin.it> <4f750f9f$0$29981$c3e8da3$5496439d@news.astraweb.com> <4f752a3a$0$29981$c3e8da3$5496439d@news.astraweb.com> <4f758f43$0$29981$c3e8da3$5496439d@news.astraweb.com> Date: Fri, 30 Mar 2012 19:01:44 -0400 Subject: Re: Python is readable From: Nathan Rice To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1333148507 news.xs4all.nl 6891 [2001:888:2000:d::a6]:41118 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:22402 On Fri, Mar 30, 2012 at 5:45 PM, Chris Angelico wrote: > On Sat, Mar 31, 2012 at 7:58 AM, Nathan Rice > wrote: >> Programming >> language designers purposefully try to make their language C-like, >> because not being C-like disqualifies a language from consideration >> for a HUGE portion of programmers, who cower at the naked feeling they >> get imagining a world without curly braces. Fear of change and the >> unknown are brutal, and humans are cowardly creatures that will grasp >> at whatever excuses they can find not to acknowledge their weaknesses. > > Braces are clear delimiters. English doesn't have them, and suffers > for it. (Python's indentation is, too, but English doesn't have that > either.) It's a lot harder to mark the end of an "if" block in English > than in pretty much any programming language. It seems to me that Indented blocks of text are used pretty frequently to denote definition bodies, section subordinate paragraphs and asides. The use of the colon seems pretty natural too. Parentheses are fairly natural for small asides. The notion of character delimiters for large sections of text is actually pretty unnatural with the exception of quotes. > And be careful of what has to be given up to gain your conveniences. > I've used languages that demand variable declarations and ones that > don't, and I'm very much a fan of the former. There are many benefits > to being explicit about that. I don't like declarations, my personal preference is to have typed signatures, and implicit declaration with type inference elsewhere. I view it as a matter of personal preference though, the result should be the same, and it should be possible to view the code either way.