Python to be replaced by the new language called Cookie !

Chris Angelico rosuav at gmail.com
Tue Apr 1 11:19:38 EDT 2014


On Wed, Apr 2, 2014 at 1:32 AM, bob gailer <bgailer at 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



More information about the Python-list mailing list