Python to be replaced by the new language called Cookie !

B

bob gailer

April Fools =D
If you thought spaghetti code was bad, ...

in December, 1973 R. Lawrence Clark proposed a new programming
construct: COME FROM. See https://www.fortran.com/come_from.html

What can we do in this new age of GOTOless programming do to match this
incredible achievement?

How about an "against" statement.

Something like against <iterable of callable objects> throw <iterable of
arguments>?

This doesn't really capture the same weird behavior of COME FROM, but it
is a starter.


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.

PEP writers: sharpen your quills!
 
C

Chris Angelico

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
 
C

Chris Angelico

I'm using 2.8. Should I upgrade?

Definitely. Python 2.8 is supported only on Windows XP 64-bit, and you
should upgrade to 32-bit Python; this will give you a 50% saving on
all pointers, and Python uses a lot of pointers, so your code will be
more efficient.

ChrisA
 
G

Grant Edwards

Definitely. Python 2.8 is supported only on Windows XP 64-bit, and you
should upgrade to 32-bit Python; this will give you a 50% saving on
all pointers, and Python uses a lot of pointers, so your code will be
more efficient.

And you'll save a _ton_ of money on ink.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top