Path: csiph.com!usenet.pasdenom.info!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python,': 0.02; 'anyway.': 0.05; 'found,': 0.07; 'literal': 0.09; 'semantic': 0.09; 'subject: [': 0.09; 'subset': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'mostly': 0.14; 'programs.': 0.14; 'block.': 0.16; 'correctness': 0.16; 'non-trivial': 0.16; 'permits': 0.16; 'stumbling': 0.16; 'subject:"]': 0.16; 'unimportant': 0.16; 'work"': 0.16; 'attach': 0.16; 'flexibility': 0.16; 'ignore': 0.16; 'language': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'programming': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; "aren't": 0.24; 'certainly': 0.24; 'subject:problem': 0.24; 'regardless': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'communities': 0.26; 'second': 0.26; 'values': 0.27; 'header:In- Reply-To:1': 0.27; 'correct': 0.29; 'resolution': 0.29; 'possibility': 0.29; 'properties': 0.29; 'related': 0.29; "doesn't": 0.30; 'errors': 0.30; 'restrict': 0.30; 'message- id:@mail.gmail.com': 0.30; '(although': 0.31; 'complete,': 0.31; 'contrast,': 0.31; 'trivial': 0.31; 'allows': 0.31; 'languages': 0.32; 'another': 0.32; 'says': 0.33; 'programmers': 0.33; 'third': 0.33; 'problem': 0.35; 'subject:with': 0.35; 'basic': 0.35; 'received:209.85': 0.35; 'problem.': 0.35; 'received:209.85.220': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'acceptable': 0.36; 'should': 0.36; 'example,': 0.37; 'two': 0.37; 'received:209': 0.37; 'pm,': 0.38; 'does': 0.39; 'how': 0.40; 'skip:u 10': 0.60; 'easy': 0.60; 'entire': 0.61; 'first': 0.61; 'subject:The': 0.64; 'different': 0.65; 'to:addr:gmail.com': 0.65; 'techniques': 0.66; 'believe': 0.68; 'invalid': 0.68; 'opinions': 0.70; 'respect': 0.70; 'wish': 0.70; 'safe': 0.72; 'vital': 0.78; '"too': 0.84; 'complexity': 0.84; 'computation.': 0.84; 'loser': 0.84; 'respect.': 0.84; 'rusi': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=4hDkmDGioi4Dl80tY3zuIi5LLMVwf4DRNU9geMLY7MY=; b=MyP+ZoruYT0042zDayFv4oX4o0QB58VSpM6CV1CxHYrs2YHEX1Bp68D/i/CV3JpEDF /+s9VMCBgqwxZ49ZKEgr+Hz3ouGsFEhNkKDX9PH2bOHTnkFDjZ3VUnUnDK6L1qt9LgXJ A77HkPekx568TiKQmn9oc90F5ISvNzN5pEkGrMoWg6BMRqTMbLXQN7F0Cza71/HJFbjR Q76VnlAm8CHPBW7BvGls1PY7Eq2K9v+gxquZEmUJTsW/iNEGKlMO8JQ9ZrdIHPmbZO/3 3yZeU73SG+wSD/tRl/toa4XqWmGYyHwl2HjMx1MIEkyQr4BZOvSQ8eoOJ3XmXlJu5ys0 kemg== X-Received: by 10.220.202.197 with SMTP id ff5mr22376388vcb.3.1370544282831; Thu, 06 Jun 2013 11:44:42 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <57582781-3bc1-4ec5-a8b9-485453a89105@a9g2000pbq.googlegroups.com> References: <687dea63-84da-4c45-9366-cb5a10665d1f@googlegroups.com> <51ad7daf$0$11118$c3e8da3@news.astraweb.com> <31ca14e1-973d-44e6-886c-011a55755d76@googlegroups.com> <96cd7a31-40ce-4e51-9489-446b7f002a0e@googlegroups.com> <51afec46$0$29966$c3e8da3$5496439d@news.astraweb.com> <51b0565d$0$11118$c3e8da3@news.astraweb.com> <57582781-3bc1-4ec5-a8b9-485453a89105@a9g2000pbq.googlegroups.com> From: Devin Jeanpierre Date: Thu, 6 Jun 2013 14:44:02 -0400 Subject: Re: Bools and explicitness [was Re: PyWart: The problem with "print"] To: rusi Content-Type: text/plain; charset=UTF-8 Cc: python-list@python.org 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: 56 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1370544290 news.xs4all.nl 15886 [2001:888:2000:d::a6]:44381 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:47255 Super OT divergence because I am a loser nerd: On Thu, Jun 6, 2013 at 1:27 PM, rusi wrote: > Yes, all programming communities have blind-spots. The Haskell > community's is that Haskell is safe and safe means that errors are > caught at compile-time. I don't think Haskell people believe this with the thoroughness you describe. There are certainly haskell programmers that are aware of basic theory of computation. > Unfortunately* the halting problem stands. When generalized to Rice > theorem it says that only trivial properties of programs are > algorithmically decidable: > http://mathworld.wolfram.com/RicesTheorem.html > > And so the semantic correctness of a program -- a non-trivial property > -- is not decidable. Just because a problem is NP-complete or undecidable, doesn't mean there aren't techniques that give the benefits you want (decidability, poly-time) for a related problem. Programmers often only or mostly care about that related problem, so it isn't the end of the line just when we hit this stumbling block. As far as undecidability goes, one possibility is to accept a subset of desired programs. For example, restrict the language to not be turing complete, and there is no problem. Another resolution to the problem of undecidability is to accept a _superset_ of the collection you want. This permits some programs without the property we want, but it's often acceptable anyway. A third approach is to attach proofs, and only accept a program with an attached and correct proof of said property. This is a huge concept, vital to understanding complexity theory. It may be undecidable to find a proof, but once it is found, it is decidable to check the proof against the program. Haskell takes something akin to the second approach, and allows errors to exist which would require "too much work" to eliminate at compile time. (Although the type system is a literal case of the first resolution). Python, by contrast, often values flexibility over correctness, regardless of how easy it might be to check an error at compile time. The two languages have different philosophies, and that is something to respect. The reduction to Rice's theorem does not respect the trade-off that Haskell is making, it ignores it. It may be a "pipe dream" to get everything ever, but that's not to say that the entire approach is invalid and that we should ignore how Haskell informs the PL discourse. For some reason both the Python and Haskell communities feel the other is foolish and ignorant, dismissing their opinions as unimportant babbling. I wish that would stop. -- Devin