Clickbait nonsense.
My advice, life is too short to use tools you don't like (and subsequently makes you complain about it).
I personally love python, vim and debian. So that's what I'm using for the past 20 years.
If I was forced to write java for a living I would probably end up unhappy as well.
I agree. I was ambivalent-to-positive about PowerShell but now i absolutely loathe it after being forced to use it ( forced often by myself, because it was still the best option to work with the absolutely terrible APIs and SDKs of VMware products). I hate it so much I've wondered about starting a series on my blog called "Tech that really grinds my gears" ( Family Guy reference) where i rant about terrible software like PowerShell and VMware vSphere.
Python has so many things you just need to know to get going, so much magic and a typical complex codebase has so many broken things, it sometimes even feels worse than Java. Some people love it, and easily deal with it (it seems), but I don't, so just a humble opinion.
It seems like everybody hate significant white-space, but I think it's only an annoyance with good editor support (god help you if you are stuck on nano in a remote session).
If you like C syntax more than Python like me, go immediately becomes a great substitute. I'd also say Typescript but npm nearly matches pip in terms of annoyance sometimes. Deno is cool though, definitely needs a mention!
Machine learning? Best of luck to you! If there's someone working with go/ts in ML field, would love to hear more!
After reading through the whole rant, it seems like this particular developer wants an approachable, powerful language that is statically typed, high performance, concurrent, memory safe (without garbage collection), without long compile times, and uses # for comments.
If you remove the no-GC requirement, Go fits the bill perfectly. But it fails badly on the GC aspect because you can't even tune it a lot! However i personally don't like manual memory management unless there's some actual need for it, so I'm quite happy with Go.
Pythons biggest problem is it's weak support for programming mobile platforms (android, iOS, etc.). Incidentally Apples move to ARM on desktop is forcing the Python community to improve in that direction. Only if Python becomes relevant also on mobile platforms it can stay relevant in the future. Otherwise we are doomed to a future where JavaScript will be everywhere.
I like it, I just wish they had specifically disallowed tabs. Nothing against them, but allowing a mix of tabs and spaces was a horrible idea. They should have settled on one.
Love it, was a masterstroke. Less is more. Needs trivial editor support, however.
If you’re having trouble I suggest showing leading whitespace in the editor with a very low contrast grey highlight color. Ended all issues for me a decade or two ago. Indentation guides help any language as well. Simple editors like Geany can handle it well.
Unfortunately, Python has gone backwards with the adding of colons everywhere. Pseudocode aspect has sadly been lost imho.
Agreed. I’m getting more annoyed by seemingly-unnecessary characters these days. Are the colons after if/for/etc really needed for parsing? Could they be made optional, as JS has done for semicolons?
If I'm not mistaken Python was one of the first main-ish programming languages which made list comprehensions a thing, imo there's nothing wrong with their syntax. kwargs are also pretty cool.
My main problem with list comprehensions is that, compared to a chaining map and friends (Ruby, Rust), I have to rewrite my expression more often away from list comprehensions as my code evolves or when I need to debug it. So I start to feel like "whats the point?".
If Python was a barrier on data/ML, then certainly the the data/ML community would have circled around a different programming language... but it didn't. All evidence says Python has some quality about it that that makes it good for data/ML but you think it's a drag? You even point out that Swift couldn't replace it despite efforts.
The author has the same weird logic that Python wouldn't be as popular without Numpy... but it does have Numpy... Usain Bolt wouldn't be as fast if he didn't have legs too.
Let’s say you have small amount of data, 1Go than can easily fit in the memory of a laptop.
You try to load or do analysis of that with python. The only way to make it work is to use a library that is build in C. Forget doing for loop over that thing. So each library has to build a language of parameters to allow you to use the speed and memory efficiency of C. Effectively in ML python act as a config language for C.
So all the actual work has to happen in C, but all your experiment are in python. That create a barrier to innovation as you hit limit of performance on python and you have to switch language.
But yeah, all the library are in Python and most of the work is still done there so it’s very hard for people to move to something else because they would have to rebuild a huge part of the stack, there is a strong network effect here.
But the core language is still very bad for performance computing.
First off, this thing is just a (click/flame)bait post. Bulleted list with zero explanations. That said, no language is perfect and I can agree with some of it. Addressing points I disagree with the most:
- Startup time: Given that this is a self-professed C(++/#) programmer, _of course_ Python will be slower than a compiled language. This is just a compiled language fan not liking a "not compiled" language, and has nothing to do with Python itself.
- Import system: Having historically used/dabbled with about a dozen+ languages, I have yet to find an import system I like, including the C family of languages.
- Toxic runtime environment: Ignoring the strange use of the word "toxic", without ANY detail whatsoever on what they mean by this, this is pretty useless criticism.
- Error handling / Exceptions: Not sure what he's comparing to. 90% of languages do bad error handling; even the newer ones like Rust/Go/Elm that try to do this well have their own faults and most people ignore them. Also, given that it's a C-family programmer stating this... Python does exceptions basically the same as the C-family, so yeah I guess he hates his favorite languages too?
- kwargs: Without any context, this is a meaningless complaint. Care to elaborate? No? Moving on then.
- List Comprehension syntax: This one is baffling to me. I guess someone who is used to C#'s Linq might find this a bit harder to grasp, but as someone who has used both professionally it's really not that bad, and this syntax is one of the things most people love about Python.
- Globals: Yes, we hate them too. _That's why nobody in their right mind uses them_
- Variable scope: IMO python variable scoping isn't that bad -- maybe a few warts, but I've never had significant problem with it.
- Significant whitespace: I mean....how? Yes it has whitespace-based blocks, but...it's not actually MORE whitespace than a {}-based language... What does "significant" mean here...?
- Standard library: You mean one of the best things about Python? That I don't need 60 billion dependencies on my project to be able to the most basic shit? Now you're just being ridiculous. Also, coming from a C# dev? C'mon man.
- Dependency management: Needs more context. requirements.txt isn't the best choice, but Poetry makes things much more standardized, and very easy to manage -- no different than many other dependency managers.
- Environment variables: ....What? What about them? This isn't a Python thing. Do you dislike how it handles them (as a hashmap)? Do you dislike the environment variables used by the Python runtime? ELABORATE.
- Jupyter Notebooks: Well given that this is not only 100% external to Python, but also completely a voluntary and (AFAIK) not "industry standard for all Python devs" tool, it's like calling C a shitty language because of Arduino.
TLDR: Congrats you googled all the things someone could possibly hate about a language and posted them in a bulleted list without context and called it a "rant"
Also:
> Criticism and nitpicks aren't wrong, but miss the point. Truthiness > Truth
Oh okay, so you never once intended to listen to anyone. Might as well publish these posts to /dev/null
Meaning that there is significance to whitespace, as opposed to C where you could cram it all onto one line if you wanted. To put it another way, C doesn't care how you indent, if you even do it at all. Python cares, and will not run your program if you get the whitespace wrong.
Whereas I think you read it as "there's lots of whitespace in Python", which is not what was intended.
> - Import system: Having historically used/dabbled with about a dozen+ languages, I have yet to find an import system I like, including the C family of languages.
For me, Python has been one of the better ones. I especially like that its explicit where a symbol comes (unlike C/C++, C#, Ruby) from unless you explicitly opt-out (D is confusing about this).
My main gripe (assuming visibility of items isn't import related) is that it merges pulling symbols in from a module with loading a module, leading to initialization order confusion and several gotches that confuse people.
> Significant whitespace: I mean....how? Yes it has whitespace-based blocks, but...it's not actually MORE whitespace than a {}-based language... What does "significant" mean here...?
I believe that the author means that the white space itself is significant as a part of the syntax... which it shouldn't be.
Python was very good in the 2000 with the included batteries but I don’t think they are up to the task anymore 20 years later.
Python became the glue language for ML, but that was never it’s intended target and I think that we see more and more than we need something else to go forward.
There are plenty of very dynamic languages that still have quite reasonable performance. JS is the most well known, but many Lisps also are quite good. Being slow is an explicit decision of Python.
One thing the author missed: Python's syntax for functional programming is really awful. Even Java streams feel like a work of art when I am forced to use expressions with 50 closing braces in python
I agree. That being said, functional programming has almost no benefits in a language like Python, since it well execute more-or-less equally as fast as an imperatively written or OO-based program.