36 Comments

This was simply a satisfying and stress-relieving read after being forced to develop a program in Python knowing that someone thinks the same. It was an absolute nightmare spending time debugging in Python.

Python is an absolutely horrifying language to build a proper program. It's like trying to build a house on top of a base that could collapse at any point. At first, it may seem that it doesn't take much effort to build the base for a program in Python, and it is. But, low-effort work only results in low-effort product. Languages such as Java, C/C++ or Rust definitely take more time for you to build the base, but it is extremely solid and can support your program over a much, much longer period of time.

And those languages definitely takes a lot more time for you to grasp a proper understanding. But once you do, you can see a solid and strong connection between everything. Python takes little to no time for you to understand it, but your understanding is rather lose. And that will only backfire when you build large programs as that lose understanding will only result in you barely being able to draw connections between anything, turning debugging into an absolute hellhole.

As a person who prefers to have a good understanding of whatever I'm doing and not just "it magically happens", I can never see the "improvement in efficiency" when developing in Python. I only see a 10 times decrease in efficiency compared to C++. Hell, even something such as JIT Javascript is more efficient than Python for me.

And then we have how incredibly slow Python is. And then you'll have to install a shit ton of libraries to make it better. And then you realize that's like installing hundreds of fan-made mods into a game and hoping that it won't crash.

Expand full comment

Meta's new thread backend was written by https://github.com/facebookincubator/cinder which is based on python 3.10.

Expand full comment

Have you read the README.MD file? Because you are in for a surprise.

It has pearls like:

"Cinder is not polished or documented for anyone else's use. We don't have the desire for it to become an alternative to CPython. Our goal in making this code available is a unified faster CPython. So while we do run Cinder in production, if you choose to do so you are on your own. We can't commit to fixing external bug reports or reviewing pull request"

Expand full comment

Absolutely true in every sense. I was/am a programmer from the 80's using pseudo code to test the functions. Then we used a suitable language. BBC basic is so superior to python I dont understand this almost star stuck liking for python. Declaration of variable types is a MUST if we are to manage memory. Oh python does that for you...really?

Best programming language for nerds ? APL without doubt 1 line in APL is a thousand in any language😀

Expand full comment

The syntax/semantics/paradigm/etc of the language you use is almost irrelevant compared to other factors that have a much bigger impact on projects. Team experience and familiarity, development management/processes/practices, support tooling, documentation, language ecosystem, language maturity, management support, etc, all make a much bigger difference to the outcome.

I've worked on a large (aerospace) project using macro-assembler where after more than a year of coding only a single bug was found during integration testing. AFAIK that is the only bug ever found in that software. It went well despite the "crappy" language because everything else was in excellent order, and I personally found the language a joy to use.

I've seen Python projects that grew into terrible messes, and people claiming "Python is unmaintainable compared to C++". However, those terrible Python programs ran (and accumulated cruft hack fixes) for years, while the other C++ programs around them were re-written from scratch multiple times.

I've seen projects using "cool new languages" stumble over all the immature-language sharp edges like compiler bugs, crappy error messages, poor documentation, insufficient debugging tools, missing libraries, steep learning curves, etc. Support for excellent type-checking, contract-programming, memory safety, etc become largely irrelevant when you run into these problems.

Personally, I don't care much about the language, the language ecosystem matters more, and the project procedures/processes/practices matter even more. Given unlimited language choice I will choose a mature language I know well using a paradigm that fits the project, unless I'm intentionally planning to assess/learn a new language (in which case I know the project is going to suffer for that).

Expand full comment

Oh my oh my, finally a post of yours that I can (mostly) disagree with!

I too pushed and argued for rewrites out of Python. Python 2.7, that is. However, Python after 3.10 is a _different_ language. Good static typing (actually good, not fake), pattern matching (!), etc. etc. And now, proposals on removing the GIL.

Also, Python has proper exceptions, compared to Go's "if err != nil" manual handling of errors (unless they finally implemented better error handling - haven't checked in the last 2 years). I consider this the biggest fault of Go, which (probably not for good reasons) has put me off. I refuse to have to manually check for errors, when the compiler can in all sane languages generate code to do it. Yes, even in Python 😅

Expand full comment

I wouldn't say it is radically different. Most already existing code does not make use of these features. This may change, but static typing will always be an after thought without strict guarantees.

I agree with the author on a lot of points. I recently had to refactor an application written by a PhD student over the course of 3 years with no docs, no comments, no tests, and basically every convention in the book broken. People might say the fault is most definitely the developer for not following best practices. That's great to hear, but it doesn't change the fact that the code is a piece of spaghetti. Static typing saves time even in the worst case scenario. I don't want to have to mind read the author to know what entpath(A, B, C, D) does and spend hours understanding what the type of a single parameter is.

Expand full comment

Well, of course a three-year old codebase is old. But we were not talking, I thought, about code written by students, but whether Python is a valid language (not the best, but a valid one) for large projects.

My point was, that it seems Joss' point of view is about old-style Python. And my view is that today, a lot of that criticism is _less_ valid than it was 10 years ago - basically, the cost of writing good Python today is much less than in the past, almost to the level of a reasonable language.

I still prefer to write in Haskell in my free time. Neither Python, nor Go, are strong enough in types to make it worth the few hours I can afford to take from family. But I do appreciate the effort that Python community is going through to make it a better language.

Expand full comment

That is fair.

Expand full comment

Thank you!! You might laugh at what I’m about to say next, but I built an ASP.NET Core Web API program, (I think? lol), as a non-programmer, using chat gpt 01-preview with a JS front end and a C# back end.. it invokes openai api to perform a fairly repetitive data evaluation, that operates with four main variables, each containing many properties. I’m being intentionally vague as I’m not supposed to be using AI for this, (and thanks to python i haven’t gotten very far). After developing the core functionality that retrieves all the relevant data, I realized that although I’d figured out how to access and manipulate the data I needed, taking all the necessary variables into account that needed to be considered in evaluating my data, was considerably more complex than I initially realized. As a know-nothing hack, I asked chat gpt how to proceed, and it told me that creating a second backend in python to do the rest of the data processing was a good idea. This began a dark period in my life, through which I came to relate, in the most amateur way possible, to everything you said about having to test every tedious edge case, 10,000 x, generating new errors every time, often related to case errors, a million property name incongruencies between the two back ends, and endless other tedious bs, until I started to feel that python was the most finicky, fragile, and unpredictable language I’ve come across in my short forée into open ai programming, (I did make another program through much trial and error). I’m very glad to learn that my endless frustration with python may not just be 100% me.. I’m going to try and use 01 preview and phind to translate the python into some kind of auxiliary backend C# entity that refines my data the rest of the way. Thank you!!

Expand full comment

Thank you!! You might laugh at what I’m about to say next, but I built an ASP.NET Core Web API program, (I think? lol), as a non-programmer, using chat gpt 01-preview with a JS front end and a C# back end.. it invokes openai api to perform a fairly repetitive data evaluation, that operates with four main variables, each containing many properties. I’m being intentionally vague as I’m not supposed to be using AI for this, (and thanks to python i haven’t gotten very far). After developing the core functionality that retrieves all the relevant data, I realized that although I’d figured out how to access and manipulate the data I needed, taking all the necessary variables into account that needed to be considered in evaluating my data, was considerably more complex than I initially realized. As a know-nothing hack, I asked chat gpt how to proceed, and it told me that creating a second backend in python to do the rest of the data processing was a good idea. This began a dark period in my life, through which I came to relate, in the most amateur way possible, to everything you said about having to test every tedious edge case, 10,000 x, generating new errors every time, often related to case errors, a million property name incongruencies between the two back ends, and endless other tedious bs, until I started to feel that python was the most finicky, fragile, and unpredictable language I’ve come across in my short forée into open ai programming, (I did make another program through much trial and error). I’m very glad to learn that my endless frustration with python may not just be 100% me.. I’m going to try and use 01 preview and phind to translate the python into some kind of auxiliary backend C# entity that refines my data the rest of the way. Thank you!!

Expand full comment

Thanks for that write-up. I couldn't have put it better myself. As a C/C++ developer of 26 years it pains me to see all these developers/companies using languages like Python, Perl, and JavaScript. These languages are great at teaching the basics of programming because of their simplicity, but they were never designed for, and should not be use for, large code bases. A Formula 1 race car driver would never race a Toyota Corolla. A Corolla is a fine car, it will get the average person where they need to go, but it's not deigned for professional use. Similarly, please stop using non-professional languages as if they were designed for professional use.

Expand full comment

Stupid rant article with hardly any wisdom, which is ironic considering the title of said substack. I stopped taking you seriously after you repeated the false assertion that QWERTY is bad myth. (It's not, see here: https://www.smithsonianmag.com/arts-culture/fact-of-fiction-the-legend-of-the-qwerty-keyboard-49863249/). I like how you make grand assertions without backing any of it with any substantial proof. Get some proper citations or case studies that have been peer reviewed.

Expand full comment

You have understood exactly nothing about the article and the spirit in which it is shared. Maybe you will agree with its companion article: https://josvisser.substack.com/p/why-python-is-amazing.

Expand full comment

I write test automation. Python is a nightmare. I'm sticking to C#

Expand full comment

Believing that a programming language that verifies the types of data manipulated will solve the problem is a chimera. I started programming in 1975 and have used some twenty different languages and written, at least, 10,000 lines of code in each of them. So I also have a certain amount of experience... It's perfectly possible to write horrors in every language I know. There are compiled languages, which are convinced they know better than you and will push you to write some of the worst monstrosities, simply because the compiler doesn't understand the asynchronism of certain functions. Writing code requires a great deal of discipline and rigor. Personally, my Python codes all have the __main__ part used to test all functions, methods, objects, etc. in each file. My Makefiles are designed so that the library can only be installed if all the tests have been validated, and so on. I've used Python for very large applications in critical areas such as the financial markets, where every millisecond counts; 24 hours a day, 7 days a week. No language is going to turn a bad programmer into an extraordinary developer... alas...

Expand full comment

Strongly typed programming languages are not a panacea, but they do make it easier to write programs small and large that are more reliable and that are easier to maintain. It is totally _possible_ to write good programs in Python that are easy to maintain, I posit it is just _harder_ than with languages that support strong typing. That doesn't mean that it is not possible to create terrible programs in these languages.

Expand full comment

100% of this text is wrong, you are confusing python with its default implementation Cpython, on the other hand, all those problems that you say are from "python" are a consequence of its misuse and a rampant ignorance about good practices when it comes to using python, that way of working makes you eventually end up with garbage code regardless of the language

Expand full comment

This comment is 100% wrong. Your argument is basically: If you write all code perfectly following all appropriate patterns then it is possible to write great code in Python. This is undoubtedly true, but shows a lack of understanding of how practical software engineering in the real world actually happens. Taking a chance to derail this thread completely: Your argument is that of the NRA: If everyone who owns guns behaves responsibly all of the time and under all circumstances, there is no problem with widespread gun ownership. Reality begs to differ.

Expand full comment

People mentioning how great python is... Well actually the "libraries" are great. Basic python does nowt without importing a whole load of external stuff. Cant even find cosine without importing. Oh well Always BBC Basic

Expand full comment

Ok… thanks for the link. So I see this Jekyll and Hyde scenario going on here… so I will just stay out of it. Thanks for giving me the total picture. Even though I can’t say I understand what you are trying to achieve, the two articles do represent a balanced viewpoint, for which I thank you. If not already… these articles could be published as a series that makes their connection more obvious. Best of luck in your programming and writing! Thanks for the dialogue.

Expand full comment

I get that, but that is not what comes across. Python IS the right tool for many jobs and I think you could have ended with that. Netflix and others have built fortunes and great user experience with Python and with new programmers reading your post, you have a responsibility to tell the whole story. This was a rage quit of a rant that says more about you than it does about Python. You didn’t mention PEP or any efforts to make Python as useful as possible. You just pooped on something that is bringing peoples ideas to life everyday. Without Python, and maybe R… I don’t know if Data Science would be what it is. I mean… Python string manipulation is unrivaled. Python libs are unmatched. There are tradeoffs that deserved mentioning and tradeoffs is what programming is about. Try being balanced, not hyperbolic. Remember…the kids are listening and the internet is forever.

Expand full comment
Jan 26Edited

This is funny! You are mad because you lack the skills to use a tool!? Are you mad at hammers for not striking the nailheads just right. Did you run to Home depot a get a new hammer? Did you google “Best hammers of 2024?” Python is popular with companies because they have legacy code going back like 20 years! Of course these jobs pay well and are plentiful because of all the reasons you mentioned. Python isn’t meant to be perfect. I use Lua, C, Python, and Typescript and I don’t LOVE any of them. I love building things and these are the tools available. If you don’t like the tools, contribute! Write us a language that we can love and call the “best!” You will soon see why certain languages have the limitations that they have. Interpreters, VMs and other necessary nonsense. I would love to see you use C as your “metal language” or 5 different assembly languages. Hope you have 30 years or so to get up and running! If you rewrote software in Rust… and Rust is so great…why did you switch to Go? Did Rust let you down as well? Is Rust not as shiny as it used to be!;-) Spoiler alert! Everything seems shiny when you are running from something else.

Think about what you are asking for just a moment! Computers are not magic, they are science and science has limitations. You sound like my kids asking “why can’t we just use html for everything!” Sorry programming is hard for you. You should probably quit or get really angry and write us the best language we have ever seen! Or… write an article of proposed solutions to the problems…Or, contribute to Python Dev. Otherwise… you just sound like a little yapping dog, upset that you can’t run with the big dogs! Puppy growling with your arms crossed because “programming and refactoring takes a long time….hmph!!” Man up bro!! Don’t relegate yourself to being a little yapping dog, especially the female variety. It’s not a good look.

Expand full comment

The only thing I am asking for is that people use the right tool for the job.

Expand full comment