top | item 16337435

All the things I hate about Python

8 points| natemurthy | 8 years ago |medium.com | reply

7 comments

order
[+] makecheck|8 years ago|reply
I dislike examples of a concept when the made-up code is not properly using the language. You don’t write is_valid() calls in Python: you “try:” things that may fail.

As far as dynamic typing: for every unfortunate runtime surprise that dynamic typing can give you, I can find a multi-page compiler error in a statically-typed language that was frustratingly finicky about type precision. Neither is a clear win; yet I really like how dynamic systems naturally encourage good test infrastructures. Also, use linters.

The Python 2/3 divide is real though. I guess we’re still better off than Perl (6.x seems pretty unused).

[+] CurtHagenlocher|8 years ago|reply
The author does not understand the difference between weak vs strong typing and dynamic vs static typing.
[+] blokeley|8 years ago|reply
Don't bother reading the article. It's an unenlightened rant.

Indeed, the author does not know that Python is strongly typed. Most of the article is nonsense.

If you're running the same code on different machines or virtual machines and one fails, the first thing you check is the version numbers of the runtime and libraries. This is true in any language.

[+] natemurthy|8 years ago|reply
Let me ask you all this: Why was Hadoop written in Java and not Python? Why was Spark written in Scala and not Python? Why was Kubernetes written in Go and not Python? Why was Mesos written in C/C++ and not Python?
[+] al2o3cr|8 years ago|reply

    The fact that I cannot, in the absence of perfect test
    coverage, verify the correctness of someone’s code is a
    big red flag.
Pssst... you can't do this with any type system. You might be able to come close with some of the fancier dependent-typing stuff, but at some point a "sufficiently-specific type specification" starts looking an awful lot like a QuickCheck-style test.
[+] ianamartin|8 years ago|reply
This kind of article is why I mostly avoid Medium.