Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
All the things I hate about Python (medium.com/natemurthy)
8 points by natemurthy on Feb 9, 2018 | hide | past | favorite | 7 comments


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).


I use Perl 6


The author does not understand the difference between weak vs strong typing and dynamic vs static typing.


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.


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?


    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.


This kind of article is why I mostly avoid Medium.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: