Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #69521

Re: Python to be replaced by the new language called Cookie !

References <1a31$533a76d6$5419b3e4$11235@cache80.multikabel.net> <533ACE09.2070809@gmail.com>
Date 2014-04-02 02:19 +1100
Subject Re: Python to be replaced by the new language called Cookie !
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.8806.1396365582.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, Apr 2, 2014 at 1:32 AM, bob gailer <bgailer@gmail.com> wrote:
> How about a "without" statement?
>
> without <identifier [, identifier ...]  [raise <exception>]:
>   <suite>
>
> Within the <suite>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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python to be replaced by the new language called Cookie ! "Skybuck Flying" <Windows7IsOK@DreamPC2006.com> - 2014-04-01 10:20 +0200
  Re: Python to be replaced by the new language called Cookie ! bob gailer <bgailer@gmail.com> - 2014-04-01 10:32 -0400
  Re: Python to be replaced by the new language called Cookie ! Chris Angelico <rosuav@gmail.com> - 2014-04-02 02:19 +1100
  Re: Python to be replaced by the new language called Cookie ! Dan Sommers <dan@tombstonezero.net> - 2014-04-02 04:15 +0000
    Re: Python to be replaced by the new language called Cookie ! Chris Angelico <rosuav@gmail.com> - 2014-04-02 16:42 +1100
      Re: Python to be replaced by the new language called Cookie ! alex23 <wuwei23@gmail.com> - 2014-04-02 17:17 +1000
      Re: Python to be replaced by the new language called Cookie ! Grant Edwards <invalid@invalid.invalid> - 2014-04-02 14:20 +0000
  Re: Python to be replaced by the new language called Cookie ! Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-04-01 21:04 -0400

csiph-web