Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed1.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'else:': 0.03; 'subject:Python': 0.06; 'patterns.': 0.07; 'exception.': 0.09; 'generators': 0.09; 'identifier': 0.09; 'orientation,': 0.09; 'raises': 0.09; 'stating': 0.09; 'subject:language': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'def': 0.12; 'language,': 0.12; 'times,': 0.14; '"."': 0.16; 'bonus,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'generators.': 0.16; 'pythonic': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'all,': 0.19; 'module': 0.19; 'version.': 0.19; 'programming': 0.22; 'separate': 0.22; 'cc:addr:python.org': 0.22; 'commands,': 0.24; 'finally,': 0.24; 'cc:2**0': 0.24; 'mention': 0.26; 'supported': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'newer': 0.30; 'programming.': 0.30; 'specified': 0.30; 'message-id:@mail.gmail.com': 0.30; "skip:' 10": 0.31; 'own,': 0.31; 'anyone': 0.31; 'class': 0.32; 'critical': 0.32; 'style': 0.33; 'subject:the': 0.34; 'classes': 0.35; 'objects': 0.35; 'received:google.com': 0.35; 'version': 0.36; 'instances': 0.36; 'module.': 0.36; 'yield': 0.36; 'should': 0.36; 'list': 0.37; 'easily': 0.37; 'implement': 0.38; 'subject:new': 0.38; 'expect': 0.39; 'functional': 0.39; 'support,': 0.39; 'skip:p 20': 0.39; 'how': 0.40; 'even': 0.60; 'subject: !': 0.61; 'more': 0.64; 'within': 0.65; 'series': 0.66; 'improvements': 0.68; 'price': 0.69; 'default': 0.69; 'recursion;': 0.84; 'absolutely': 0.87; 'adopt': 0.91; 'to:none': 0.92; 'rank': 0.93 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:cc :content-type; bh=Hmh0IpdE+7r2NfE1XY5qMQfldiSvCHNf/ssm9PDzgrY=; b=hyBTJVZU3EIVqGJCuJ+uVBnvQlA0jnbyyU2U69EIHp8ZGb44d9csJAelWo78+zedlz 7gyJ9LUPtccDIRM7HWZJiySNylfJtPE5oycLyafYYk6pK5nfX4uwCvDcInuaYqBu+HhA UZse37ZE+00pzp4Wd0iyeNfQK7Prh0hvS1oTBRoF+j5cLoMGP89YAaFPHEAhoyCPRq5W G/C/jgKKetaHFbuPN0vTVdmf/lglid8ZIBilo+4Hs2IQ71DFbbox9X+tKw/pMXWeqVFS 7Q1I4ZOfZGZlqJvCNSv0nqOvwSYFSSz8h9PusI6EvRgXAQNo0EdhMwLOhJXe/qJz3wjP ymmQ== MIME-Version: 1.0 X-Received: by 10.68.201.10 with SMTP id jw10mr31618993pbc.25.1396365578118; Tue, 01 Apr 2014 08:19:38 -0700 (PDT) In-Reply-To: <533ACE09.2070809@gmail.com> References: <1a31$533a76d6$5419b3e4$11235@cache80.multikabel.net> <533ACE09.2070809@gmail.com> Date: Wed, 2 Apr 2014 02:19:38 +1100 Subject: Re: Python to be replaced by the new language called Cookie ! From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 62 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1396365582 news.xs4all.nl 2890 [2001:888:2000:d::a6]:55016 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69521 On Wed, Apr 2, 2014 at 1:32 AM, bob gailer wrote: > How about a "without" statement? > > without ]: > > > Within the Any mention of any identifier in the list raises the > specified or default (WithoutError) exception. In the interests of anti-patterns, we should adopt converses to all the classic patterns. Instead of Object Orientation, where you instantiate a few classes many times, we have Object Disorientation: every object is in a class of its own, and all objects rank equally. No more hierarchies, we have true equality! Also, we should recommend Dysfunctional Programming. Recursion is bad, and all instances of it should be turned into generators. Behold: # Functional programming style def spam(x): return "." + ham(x) def ham(y): return spam(y-1) if y else "!" def __main__(): print(spam(5)) __main__() # Dysfunctional style def spam(x): yield " " + next(ham(x)) def ham(y): if y: yield from spam(y-1) else: yield "!" def __main__(): print(next(spam(5))) __main__() Generators are inherently more Pythonic than recursion; after all, they have language-level support, while recursion doesn't even get the meager support of a "call self" opcode. Finally, Imperative Programming should be replaced with a much more courteous Request Programming. Instead of stating what you expect the program to do with a series of commands, you implement everything using the 'requests' module and the 'http.server' module. As an added bonus, you can very easily separate components of your program across multiple processes or even multiple computers, without any extra effort! These improvements are absolutely critical to the language, and should be made in Python 2.5.7, 2.6.9, and 3.0.2. Anyone using a newer version of Python is paying the price for early adoption, and should back-level immediately to a supported version. ChrisA