28 Comments

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

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
Aug 2, 2023·edited Aug 2, 2023

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
Apr 7·edited Apr 7

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

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

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 26·edited Jan 26

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 object model in Python is fundamentally broken. Of course, purists will say "You are using it wrong!" But this isn't the case. To take a simple case, let's say I have a class hierarchy of "People - { teachers, bakers, doctors, engineers} So teacher isa person, baker isa person. I want a class variable that counts how many people are made. The problem is if a method in, say, doctor, tries to access the count, it will get doctor.count not person.count. Of course, you can use person.count to change this but then that implies you understand how the base classes work. For example, if person changes to worker - {person, robot} and I really wanted a count of all workers now person.count is not the right place to go. So I have to fix all my code that refers to it that way. This is the whole reason OOP exists is to avoid this situation! It is clear that Python is a scripting language flexible enough to glue on anything, but that doesn't mean you should. Yes, you can work around (provide a method that returns the count to localize the change). But then that means you do not really have class variables. You say you do, but you don't. Broken. Not that there aren't parts of all languages that might be broken but for your reasons and the broken object model I won't use Python for large projects.

Expand full comment

Thank you! I wish everyone would read this before writing one more line of code in Python. I'm so sick of seeing advertisements from companies marketing their Python courses to prospective programmers.

Expand full comment

> I once worked with a service in Python that forked worker processes to handle requests, ensuring that all cores could be used.

So? Almost all of us do ~Web. HTTP request comes in, is processed, response is returned. I often have to take database locks in my work to have **less** concurrency.

> ...it's the equivalent of starting to build a skyscraper by putting up a few prefab walls (never mind the foundation) and immediately wanting to use the bathroom. That's not how we build skyscrapers and it's not how we should build software.

This is exactly how we should mostly do it. Get an MVP up and running in a day, build smaller systems into bigger systems. Moon landers & nukes are maybe the exceptions.

> you probably have no business writing software for a living.

This is such a dead end. Yes, there aren't enough geniuses on the planet to go around. What do?

Expand full comment

I agree, and ours not a popular opinion, I'm afraid, because there are far more Python developers out there than there are people how have had to deal with Python code in production, and especially at larger scale.

Python is fine for small scale experimentation. Building large things out of it is sheer lunacy: e.g. the issues with performance, awful dependency management (aka "some guy on the internet broke my code" by making a breaking change to a package that is depended on by a dependency of one of your dependencies... good luck with that), and worst of all, the raging dumpster fire that is Python packaging. It's so bad there's even an XKCD about it: https://xkcd.com/1987/.

Why is there not "one way to do it" when it comes to Python packaging? That motto was a reaction to Perl's "there's more than one way to do it", and the irony is that Perl solved packaging very nicely with a set of tools that all integrate and work well together, and one packaging system. In other words, there's one way to do packaging it in Perl, and it just works.

In Python, there are 14 ways and next year there will probably be 15. None of the tooling from those 14 different approaches interoperates well with the other 13 because they all reinvent the wheel, and none of the "solutions" is feature complete. The fifteenth one will have the same problems because the people behind it will give up partway through solving the problem, like all the groups before them, because it is tiring to reinvent the wheel.

Like you, I write scripts in Go now. Easy to read, easy to make production ready, easy to write rock solid multithreaded code (try *that* in Python!), extremely fast to compile, most potential runtime problems are detected at compile time, good dependency management, and it is easy to package (aka "copy the binary"), etc.

Expand full comment

I love Python and I consider myself as an expert. I am not in love (yet) with Go.

But honestly: you are completely right !

I will turn go Go more for future use-cases, Promised!

Expand full comment

Python shines exactly in the kind of under-defined use cases where (based on a previous article) you'd use a spreadsheet. Or maybe a bash script. Except it works with all kinds of libraries, so it's even more useful. Hence the dominance in ML and data science (Colab and friends).

When it comes to writing Serious Software, I fully agree that you don't want to use Python. You wouldn't be using spreadsheets or a bash script for that either...

I can't really agree with Go as an alternative, though. It's too insular to be useful as a Python replacement (you can't just reuse a library, you have to reimplement it in Go!). And if you try to use it for Serious Software, you run into all the usual issues with garbage collected languages, but without the ecosystem and decades of fine tuning that eg Java has.

Expand full comment