Looping [was Re: Python and the need for speed]

Steve D'Aprano steve+python at pearwood.info
Sun Apr 16 13:45:37 EDT 2017


On Mon, 17 Apr 2017 03:00 am, Rustom Mody wrote:


> BTW I regard Steven's long list of things that youve missed such as
> regression tests, docs etc to be somewhat off the mark
> To see that try this experiment:
> Just add a feature to python that matters to you along with all these
> requirements: docs, tests etc etc
> Your chances of acceptance may go up marginally but most likely it will
> still not be accepted.

That's very true.

It's not enough to have working code, tests and documentation to get a
feature accepted. I didn't think I implied otherwise, but if it wasn't
clear, I'm sorry.

The feature first needs to have a reason (use-cases). It must be justified.
Unless you are Guido, "because I like it" is not enough.

When you create your own language, like Guido did with Python and Bart has
with his mystery language, your own personal taste is all it takes to get
features included. Everyone else has to justify their request, and have it
accepted by the core developers.

But even once a feature is accepted *in principle* it won't be actually
added to the language until it has tests and documentation. That's the
point I'm trying to get across to Bart. It doesn't matter how trivial the
implementation, or now much of a no-brainer it is, it still needs tests and
documentation.

In the specific case of "loop forever", I'm pretty sure that it would really
struggle to gain community favour. But even if it did, I'm pretty sure the
core devs and Guido in particular would reject it.

As I've said before, I actually like the syntax "repeat forever" -- in the
right context. In Hyperscript, it suits the rest of the language and reads
well. In Python, well, it is like grafting the head of a lion onto the
shoulder of a horse. Lions are handsome beasts, and horses are also very
attractive, individually, but making a freakish chimera of the two is not.

There are lots of ways to design programming languages, and personally I'm
particularly fond of Hyperscript's verbose English-like syntax, Forth and
other RPN stack-based languages, and Python. That's three very different
styles, and I like them all. But not all together at once.

Bart, if your aesthetic taste says different, that's your right, and good on
you. Nobody wants to tell you what syntactic features you should or
shouldn't add to your language.

I just wish you would return the favour to the Python community and stop
insisting that *your* taste is the only good taste.



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list