Python is DOOMED! Again!

Rick Johnson rantingrickjohnson at gmail.com
Thu Jan 22 07:25:00 CET 2015


On Wednesday, January 21, 2015 at 10:31:12 PM UTC-6, Steven D'Aprano wrote:
> Occasionally you find people spreading Fear, Uncertainty, Doubt about 
> Python. Python is now over 20 years old and one of the most popular 
> languages in the world no matter how you measure popularity:

What's next, are you going to drool over the TIOBE index
again? I can't help but giggle when folks put faith in crap
like that. You wanna know why python-list gets so much spam?
Because "Guido-bot" is attempting to improve Python's TIOBE
rating.

> so you don't often get FUD these days. When you do, it's
> usually about whitespace, or "Python is too slow", or
> occasionally "Python 3 is killing Python", but the latest
> FUD is about PEP 484 and type-hinting:

Yeah because people *NEVER* complain when they have *REAL*
problems, do they "Mr DeWaldo"?

> So what is this unspeakable, nightmarish, cryptic
> abomination going to look like? Here's an example from PEP
> 484:
> 
> def greeting(name: str) -> str:
>     return 'Hello ' + name
> 
> I don't know about you, but I think anyone who cannot read
> that and intuit that argument `name` is a string and the
> return result is also a string is probably going to have
> bigger troubles with Python than just type-hinting.
> 
> Remember too that type-hinting will *absolutely* remain
> *completely* optional for Python. Developers can choose to
> use it or not, 

But they cannot choose whether to *READ* it or not. Once
it's out there, it's out there, and everyone who has to
maintain code or read tutorials will have to suffer reading
noise they did not choose to write. This is not a "self-
inflicted" wound Steven, this is "assault with a noisy weapon"!

> they can mix hinted code with regular unhinted code, they
> can use type declarations purely as documentation or they
> can run an optional type-checker, as they choose.

The only thing worse than a bad idea is an inconsistent bad idea!

> Here's a potential real-world example, from the statistics
> module in Python 3.4, before and after adding annotations:

> 
> def median_grouped(data, interval=1): ...
> 
> def median_grouped(data:Iterable[Real], interval:Real=1)->Real: ...

Nice! I like how the first "toy example" was less noisy,
and then way down here you show us the real butt-uglyness of
this "feature from hell"!

> I think it is clear that Python's annotation syntax
> remains quite close to executable pseudo-code. 

Sure, for some perverted definition of "quite" and "close"!

> Fears that type-hints will doom Python are not credible.

Listen, there is a way that type hints can be introduced
*WITHOUT* forcing folks who don't care about them to read
them. If Mr Van Rossom would like my assistance, tell him to
send me a private email or ask me in this thread. 

However, if he refuses and continues down this "road to
perdition", i will be unable to help him save the Python
language, and all his work will have been for nothing. 

For the sake of this community and the many noobs who have
not found programming bliss via Python, i implore you to do
everything in your power to convince GvR that he is making a
grave mistake, for which no recovery will be possible.



More information about the Python-list mailing list