Reasons Python Sucks (2018)
51–60 of 74 posts
Re: Reasons Python Sucks (2018)
#52My main gripes:
- the half hearted take on static types
- excessive use of mutability and imperative programming
- dependency, version management and compatibility.
For this last one. Are there recommended best practices? I noticed that pip recently added a “constraints” file option which seems like it’s going towards at least the lock file level of guarantees that node has. Or do people still recommend using a separate manager (conda/miniconda).
Re: Reasons Python Sucks (2018)
#53I am not working with it directly but indirectly with ansible, and one of the playbooks (or "collections" in the latest iterations of ansible) has a stupid requirement to perform a pip install some random packages. Maybe there is a way to compile those packages offline and tell pip to use a tar ball. But I couldn't figure it out so I just commented out those specific steps. I even went so far as to grok the repo for any references to this package but couldn't find anything.
On the other hand, I do appreciate python's concise syntax and makes it easy to write a few powerful one liners.
Re: Reasons Python Sucks (2018)
#54Earlier quoted context omitted.
any language with immutability by default, say Clojure.
If the object is immutable you can't really tell if it was passed by value or by reference. It becomes an implementation detail.
For folks working in imperative languages, you can achieve this same bliss by either not modifying your function parameters in the first place (hopefully this is obvious if you care about the distinction and find the language behavior ambiguous)… or by just doing whatever copy/clone/value transfer would be appropriate as a first step if you have good reason to modify the value of a parameter to your otherwise pure function.
Re: Reasons Python Sucks (2018)
#55Overopinionated engineers are annoying. Python doesn't suck, everyone knows that. Every language has its strengths and weaknesses. Clickbaity.
> everyone knows that Uh, no. There’s a reason I prefer Node, Deno or Rust, and the reason is that Python sucks. Or at least sucks more than either of those.
Re: Reasons Python Sucks (2018)
#56Here's a better list. * Performance is very bad. * Misspelling a variable creates a new one. * __init__ is a really terrible name for the constructor. * Type annotations are ignored, so nobody bothers.
Re: Reasons Python Sucks (2018)
#57Yeah, as much as I hate python (after 10 years of a career based solely in it), “There are only two kinds of languages: the ones people complain about and the ones nobody uses.” Although if I made a list it probably wouldn't match this one. Reason 1 and 2 are basically the same, and yeah this sucks and I wish I could just build a static binary like Go. I'm surprised more languages don't make this very easy! Reason 3,…
> I don't think C/C++ is actually that much better at this?
Yeah, I really don’t know how someone could work with C and not have experience with include or linker path issues. The section on installation shows he doesn’t understand how Linux packaging works, though, so I think it’s something along the lines of a mental model which doesn’t include the extensive time which the Debian / Fedora maintainers have spent packaging that code, or that the reason why they’re not having versioning issues is that they’re using systems which only change the version on system upgrades. He could have avoided those issues with Python by only using the distribution packages just as with the C libraries, or done the inverse by preparing packages for a newer version of some C library.
Re: Reasons Python Sucks (2018)
#58Some of the author's "reasons" are bogus: "My code for Python 3.5 won't work with the Python 3.7 installation unless I intentionally port it to 3.7." Sure it will, just invoke it using the Python 3.7 interpreter. I have plenty of code originally written with 3.5 that runs just fine under 3.7, 3.8, 3.9, ... "In Python, you have to work to pass variables by value." No, you don't. Python actually doesn't pass variables…
Re: Reasons Python Sucks (2018)
#59"Reason 7: Pass By Object Reference": isn't this the case of almost every GC'd language? Java, JS, PHP, Swift, and C# all do so, although C# doesn't if your type is a "struct" not a class. Go is the only popular exception I can think of.
Re: Reasons Python Sucks (2018)
#60Overopinionated engineers are annoying. Python doesn't suck, everyone knows that. Every language has its strengths and weaknesses. Clickbaity.